aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--vimrc35
1 files changed, 26 insertions, 9 deletions
diff --git a/vimrc b/vimrc
index 9dd7056..91c627e 100644
--- a/vimrc
+++ b/vimrc
@@ -11,12 +11,12 @@ set ss=1
11set siso=999 11set siso=999
12 12
13" general 13" general
14nmap <c-c> :q<cr> 14nmap <c-c> :q<CR>
15nnoremap <leader>R :.w !bash<cr> 15nnoremap <leader>R :.w !bash<CR>
16nnoremap <leader>, :w !bash<cr> 16nnoremap <leader>, :w !bash<CR>
17nnoremap <leader>W :set wrap!<cr> 17nnoremap <leader>W :set wrap!<CR>
18nnoremap <leader>T :vertical terminal<cr> 18nnoremap <leader>T :vertical terminal<CR>
19nnoremap <leader>u :set clipboard=unnamedplus<cr> 19nnoremap <leader>u :set clipboard=unnamedplus<CR>
20nnoremap <CR> o<Esc> 20nnoremap <CR> o<Esc>
21nnoremap <C-L> 60l 21nnoremap <C-L> 60l
22nnoremap <C-H> 60h 22nnoremap <C-H> 60h
@@ -29,12 +29,27 @@ nnoremap <silent> <leader>s
29 \ else <BAR> 29 \ else <BAR>
30 \ syntax enable <BAR> 30 \ syntax enable <BAR>
31 \ endif<CR> 31 \ endif<CR>
32nnoremap <leader>S :echo join(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')),' ')<cr> 32nnoremap <leader>S :echo join(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')),' ')<CR>
33 33
34onoremap p i( 34onoremap p i(
35 35
36" new
37nnoremap H 0
38nnoremap L $
39inoremap jk <ESC>
40inoremap <ESC> <nop>
41
42" surround with '' or ""
43nnoremap <leader>' ea'<esc>bi'<esc>e
44nnoremap <leader>" ea"<esc>bi"<esc>e
45vnoremap ' <ESC>`<i'<ESC>`>la'<ESC>
46vnoremap " <ESC>`<i"<ESC>`>la"<ESC>
47
48" abbrev
49iabbrev @@ typebrook@gmail.com
50
36" vimwiki 51" vimwiki
37nnoremap <leader>tt :VimwikiTable<cr> 52nnoremap <leader>tt :VimwikiTable<CR>
38nnoremap <leader>wg :VimwikiGoto 53nnoremap <leader>wg :VimwikiGoto
39nnoremap <leader>wa :VimwikiSearchTags 54nnoremap <leader>wa :VimwikiSearchTags
40nnoremap <leader>i I- <esc>l 55nnoremap <leader>i I- <esc>l
@@ -53,10 +68,11 @@ let g:vim_markdown_conceal = 0
53" => Redirect the output of a Vim or external command into a scratch buffer 68" => Redirect the output of a Vim or external command into a scratch buffer
54""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 69"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
55" Copy from : https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7 70" Copy from : https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7
71"
56" Usage: 72" Usage:
57" :Redir hi ............. show the full output of command ':hi' in a scratch window 73" :Redir hi ............. show the full output of command ':hi' in a scratch window
58" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window 74" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
59" 75
60function! Redir(cmd) 76function! Redir(cmd)
61 for win in range(1, winnr('$')) 77 for win in range(1, winnr('$'))
62 if getwinvar(win, 'scratch') 78 if getwinvar(win, 'scratch')
@@ -84,6 +100,7 @@ nnoremap <leader>r :Redir
84" => Make Alt key works on Gnome terminal 100" => Make Alt key works on Gnome terminal
85""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 101"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
86" Solution is here: https://stackoverflow.com/questions/6778961 102" Solution is here: https://stackoverflow.com/questions/6778961
103
87let c='a' 104let c='a'
88while c <= 'z' 105while c <= 'z'
89 exec "set <A-".c.">=\e".c 106 exec "set <A-".c.">=\e".c