Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…r shortcut
  • Loading branch information...
commit 2433f9a5c466d453ef247c07f37ae9df18689d72 1 parent f79d99a
@daveray authored
Showing with 16 additions and 1 deletion.
  1. +3 −0  gvimrc.vim
  2. +13 −1 vimrc.vim
View
3  gvimrc.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
+
" http://dejavu-fonts.org/wiki/Download
if has("win32") || has("win64")
set guifont=DejaVu_Sans_Mono:h12:cANSI
View
14 vimrc.vim
@@ -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,12 +145,13 @@ 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:
@@ -155,6 +159,7 @@ 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
Please sign in to comment.
Something went wrong with that request. Please try again.