set showmatch
set complete-=i
set virtualedit=block
-set pastetoggle=<leader>p
if has('unnamedplus')
set clipboard=unnamed,unnamedplus
endif
" display
set scrolloff=1
+set scrolljump=5
set sidescrolloff=5
set display+=lastline
set lazyredraw
set ttimeoutlen=10
set winaltkeys=no
set noerrorbells
-set visualbell t_vb=
-let mapleader = ","
+set novisualbell
+set t_vb=
" command/status line
set showmode
set shell=cmd
set shellcmdflag=/c
endif
-set fileformats=unix,dos,mac
-set fileignorecase
-
-" Encoding
set encoding=utf-8
set fileencoding=utf-8
-set fileencodings=utf-8
-set bomb
-set binary
-set ttyfast
+set fileencodings=utf-8,latin1,unicode
+set fileformat=unix
+set fileformats=unix,dos,mac
+set fileignorecase
" colors
set t_Co=256
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
-" grep
-" file:line:coloumn:message
-set grepformat^=%f:%l:%c:%m
-set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
-nnoremap <silent> <leader>* :grep <cword> \| copen<cr><c-l>
+let mapleader = ","
+set pastetoggle=<leader>p
-" Netrw
+" Netrw (buildin)
let g:netrw_liststyle=3
let g:netrw_banner = 0
let g:netrw_sort_sequence = '[\/]$,*'
-" Packages
+" grep (buildin)
+" file:line:coloumn:message
+set grepformat^=%f:%l:%c:%m
+set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
+nnoremap <silent> <leader>* :grep <cword> \| copen<cr><c-l>
+" plugins
" Airline
packadd! vim-airline
--- /dev/null
+#NoEnv
+SendMode Input
+
+; Disable default CapsLock functionality
+SetCapsLockState, AlwaysOff
+
+; Post Esc if pressed alone
+CapsLock::
+
+ ; If you want to override CapsLock functionality for specific windows, etc.
+ ; Just define an OverrideCapsLock() function where you #include this script!
+ OverrideFunction := "OverrideCapsLock"
+
+ ; Call the function dynamically to allow for silent failure.
+ if (Overridden := %OverrideFunction%()) {
+ Send {%Overridden%}
+ return
+ }
+
+ KeyWait, CapsLock
+ if (A_PriorKey="CapsLock")
+ Send {Esc}
+return
+
+; Map CapsLock modified hjkl movement
+#If, GetKeyState("CapsLock", "P")
+h::Left
+j::Down
+k::Up
+l::Right
+#If