diff --git a/vim/gvimrc b/vim/gvimrc index d48b920..d581aae 100644 --- a/vim/gvimrc +++ b/vim/gvimrc @@ -4,7 +4,7 @@ set guioptions+=Rr " Turn on scroll bars if has("gui_macvim") " macmenu Window.Toggle\ Full\ Screen\ Mode key= - set transparency=12 + set transparency=7 " Fullscreen takes up entire screen set fuoptions=maxhorz,maxvert diff --git a/vim/vimrc b/vim/vimrc index 9d640fd..fcb2ce2 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -63,7 +63,7 @@ function! s:CdIfDirectory(directory) let directory = explicitDirectory || empty(a:directory) if explicitDirectory - exe "cd " . a:directory + exe "ChangeDirectory " . a:directory endif if directory @@ -209,25 +209,10 @@ au! BufRead,BufNewFile *.txt call s:setupWrapping() " allow backspacing over everything in insert mode set backspace=indent,eol,start -" Window manipulation -"map tt -map :wincmd h -map :wincmd l -map :wincmd H -map :wincmd L - " Opens an edit command with the path of the currently edited file filled in " Normal mode: e map e :e =expand("%:p:h") . "/" -" Colemak -" -" * Switch 'h' and 'n' (so 'up' is on top of 'down'). -" * Use and for and , instead (and disable 'j' -" and 'l' which are where 'y' and 'u' are in in QWERTY) -"nmap h -"nmap k - " Nicer split controls map :split map :vsplit @@ -276,6 +261,8 @@ function! s:align() endif endfunction +autocmd! FocusLost * :wa + " Prevents 'DiscretionaryEnd' being inserted when pressing in " insert mode on new files. Blame SuperTab let g:SuperTabCrMapping = 0 @@ -307,8 +294,11 @@ let g:syntastic_enable_signs = 1 let g:syntastic_auto_loc_list = 0 " Indent Guides -let g:indent_guides_color_change_percent = 10 -autocmd! VimEnter * :IndentGuidesEnable +let g:indent_guides_color_change_percent = 7 +autocmd! VimEnter * IndentGuidesEnable + +" snipMate config +let g:snips_author = 'Bodaniel Jeanes' " Disable arrow keys nnoremap @@ -320,10 +310,19 @@ inoremap inoremap inoremap +" Easy window management +map h +map k +map j +map l + " Source vimrc after saving it autocmd! BufWritePost .vimrc,vimrc source $MYVIMRC | NERDTreeToggle | NERDTreeToggle + +" Quick editing of common dot-files map vv :edit $MYVIMRC map gg :edit $MYGVIMRC +map .. :ChangeDirectory ~/.config:wincmd l:enew if filereadable(expand('~/.vimrc.local')) source ~/.vimrc.local