From 3a2e2cf27cbad20874d7eff5eea5048bdafc31ed Mon Sep 17 00:00:00 2001 From: typebrook Date: Sun, 16 Jun 2019 10:10:45 +0800 Subject: update --- vimrc | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 9dd7056..91c627e 100644 --- a/vimrc +++ b/vimrc @@ -11,12 +11,12 @@ set ss=1 set siso=999 " general -nmap :q -nnoremap R :.w !bash -nnoremap , :w !bash -nnoremap W :set wrap! -nnoremap T :vertical terminal -nnoremap u :set clipboard=unnamedplus +nmap :q +nnoremap R :.w !bash +nnoremap , :w !bash +nnoremap W :set wrap! +nnoremap T :vertical terminal +nnoremap u :set clipboard=unnamedplus nnoremap o nnoremap 60l nnoremap 60h @@ -29,12 +29,27 @@ nnoremap s \ else \ syntax enable \ endif -nnoremap S :echo join(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')),' ') +nnoremap S :echo join(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')),' ') onoremap p i( +" new +nnoremap H 0 +nnoremap L $ +inoremap jk +inoremap + +" surround with '' or "" +nnoremap ' ea'bi'e +nnoremap " ea"bi"e +vnoremap ' ``>la' +vnoremap " ``>la" + +" abbrev +iabbrev @@ typebrook@gmail.com + " vimwiki -nnoremap tt :VimwikiTable +nnoremap tt :VimwikiTable nnoremap wg :VimwikiGoto nnoremap wa :VimwikiSearchTags nnoremap i I- l @@ -53,10 +68,11 @@ let g:vim_markdown_conceal = 0 " => Redirect the output of a Vim or external command into a scratch buffer """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Copy from : https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7 +" " Usage: " :Redir hi ............. show the full output of command ':hi' in a scratch window " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window -" + function! Redir(cmd) for win in range(1, winnr('$')) if getwinvar(win, 'scratch') @@ -84,6 +100,7 @@ nnoremap r :Redir " => Make Alt key works on Gnome terminal """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Solution is here: https://stackoverflow.com/questions/6778961 + let c='a' while c <= 'z' exec "set =\e".c -- cgit v1.2.3-70-g09d2