Skip to content

Instantly share code, notes, and snippets.

@ifree
Created April 1, 2016 11:52
Show Gist options
  • Save ifree/60337b9549d3cccf92fb0822e36f5148 to your computer and use it in GitHub Desktop.
Save ifree/60337b9549d3cccf92fb0822e36f5148 to your computer and use it in GitHub Desktop.
visual studio vsvim plugin emacs mode
" Command line and search patterns history
set history=10000
" Show pattern matches as you type
set incsearch
" Hilight previous search pattern matches
set hlsearch
" Override ignorecase if pattern has uppercase chars
set ignorecase smartcase
" Show the tab bar only if more then one tab is open
"set showtabline=0
" Focus content after a page has loaded
"set focuscontent
" Show destination links in 1=status line, 2=command line
"set showstatuslinks=2
" Show completions and use AwesomeBar (+search plugins)
"set complete=sl
"set wildoptions=auto
" Ex commands output in a new tab by default (prefs, addons...)
"set newtab=all
" - Emacs GTK key-theme and FF already provide bindings for input fields
" M-x enters command mode
"noremap <A-x> :
" Emacs navigation in command line and insert mode
cmap <C-n> <Tab>
cmap <C-p> <S-Tab>
cmap <C-f> <Right>
cmap <C-b> <Left>
cmap <C-j> <CR>
noremap <C-j> <CR>
inoremap <C-j> <CR>
inoremap <C-n> <Down>
inoremap <C-p> <Up>
inoremap <C-f> <Right>
inoremap <C-b> <Left>
noremap <C-f> <Right>
noremap <C-b> <Left>
" Or use them to go to the absolute left/right of the document
noremap <C-a> 0
noremap <C-e> $
" Use C-p and C-n for up/down
noremap <C-p> <Up>
noremap <C-n> <Down>
" Use C-v and M-v for jump scrolling
noremap <C-v> <C-d>
"noremap <CA-v> <C-u>
" Use C-s and C-r for searching (n/N for next/prev as in less)
noremap <C-s> /
noremap <C-r> ?
"recenter
noremap <C-l> zz
" C-g as cancel (C-q is stop)
cmap <C-g> <Esc>
imap <C-g> <Esc>
noremap <C-g> <Esc>
" We can now also use F for Shift+b/f as back/forward
noremap F L
noremap B H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment