Browse files

added some session options, write all key, and changed highlight clea…

…r shortcut
  • Loading branch information...
1 parent f79d99a commit 2433f9a5c466d453ef247c07f37ae9df18689d72 @daveray committed Feb 28, 2012
Showing with 16 additions and 1 deletion.
  1. +3 −0 gvimrc.vim
  2. +13 −1 vimrc.vim
@@ -7,6 +7,9 @@ set winaltkeys=no "alt doesn't do window menus
set lines=65
set columns=90
+" Session settings
+set sessionoptions+=resize " remember vim window size
if has("win32") || has("win64")
set guifont=DejaVu_Sans_Mono:h12:cANSI
@@ -128,6 +128,9 @@ set history=1000
set viminfo='10,\"20,ra:,rb:
set viminfo^=!
+" Always save session with forward slashes. More portable.
+set sessionoptions+=unix,slash
" smartindent causes annoying comment handling in lanugages that
" use # as the comment delimiter (Python, Tcl, etc)
" set smartindent
@@ -142,19 +145,21 @@ set showbreak=X\ " put a little string in wrapped lines
set bs=2 " allow backspacing over everything in insert mode
" Clear search highlighting
-nmap <silent> <Leader>8 :nohlsearch<cr>
+nmap <silent> <Leader>/ :nohlsearch<cr>
" Typing :q and :w is too much work
nmap <Leader>q :q<cr>
nmap <Leader>Q :qall<cr>
nmap <Leader>w :w<cr>
+nmap <Leader>W :wall<cr>
" Semi-colon enters command window in insert mode
nmap ; q:
au CmdwinEnter * startinsert
" Hit j and then k for escape
inoremap jk <Esc>
" Ctrl-space for omni-complete
inoremap <c-Space> <c-x><c-o>
@@ -167,6 +172,13 @@ nnoremap <Leader><Space> G$a
vnoremap K k
vnoremap J j
+" In the command-link ctrl-j and ctrl-k go up/down. Slightly different from
+" ctrl-p and ctrl-n since it takes what's already been typed into account.
+cnoremap <c-j> <down>
+cnoremap <c-k> <up>
+cnoremap <c-h> <s-left>
+cnoremap <c-l> <s-right>
" keep selection when changing indention level
vnoremap < <gv
vnoremap > >gv

0 comments on commit 2433f9a

Please sign in to comment.