aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/init
diff options
context:
space:
mode:
Diffstat (limited to 'vim/init')
-rw-r--r--vim/init/basic.vim32
-rw-r--r--vim/init/special_highlight.vim28
2 files changed, 28 insertions, 32 deletions
diff --git a/vim/init/basic.vim b/vim/init/basic.vim
index 4c6cd45..d4cf3e2 100644
--- a/vim/init/basic.vim
+++ b/vim/init/basic.vim
@@ -10,7 +10,6 @@
10" EDIT 10" EDIT
11" JUMP 11" JUMP
12" SEARCH 12" SEARCH
13" SYNTAX_HIGHLIGHT
14" BUFFERS 13" BUFFERS
15" ENCODING_PREFERENCE 14" ENCODING_PREFERENCE
16" FOLDING 15" FOLDING
@@ -89,37 +88,6 @@ set smartcase
89set hlsearch " Hilight all matched texts 88set hlsearch " Hilight all matched texts
90set incsearch " Show matched strings when typing 89set incsearch " Show matched strings when typing
91 90
92
93"----------------------------------------------------------------------
94" SYNTAX_HIGHLIGHT
95"----------------------------------------------------------------------
96
97syntax enable
98
99function! GetHighlightGroupName()
100 let l:syntaxID = synID(line('.'), col('.'), 1)
101 let l:groupName = synIDattr(l:syntaxID, 'name')
102 echo "Highlight Group Name: " . l:groupName
103endfunction
104
105" Defualt highlight for matched parenthesis is so weird in many colorscheme
106" Why the background color is lighter than my caret !?
107highlight MatchParen ctermfg=NONE ctermbg=darkgrey cterm=NONE
108highlight LuaParen ctermfg=NONE ctermbg=darkgrey cterm=NONE
109
110" Show trailing spaces
111highlight ExtraWhitespace ctermbg=red guibg=red
112match ExtraWhitespace /\s\+$/
113
114" Persist visualized lines
115" define line highlight color
116highlight MultiLineHighlight ctermbg=LightYellow guibg=LightYellow ctermfg=Black guifg=Black
117" highlight the current line
118nnoremap <silent> <leader><leader>h :call matchadd('MultiLineHighlight', '\%'.line('.').'l')<CR>
119" clear all the highlighted lines
120nnoremap <silent> <leader><leader>H :call clearmatches()<CR>
121
122
123"---------------------------------------------------------------------- 91"----------------------------------------------------------------------
124" BUFFERS 92" BUFFERS
125"---------------------------------------------------------------------- 93"----------------------------------------------------------------------
diff --git a/vim/init/special_highlight.vim b/vim/init/special_highlight.vim
new file mode 100644
index 0000000..50e4dc3
--- /dev/null
+++ b/vim/init/special_highlight.vim
@@ -0,0 +1,28 @@
1"----------------------------------------------------------------------
2" SYNTAX_HIGHLIGHT
3"----------------------------------------------------------------------
4
5syntax enable
6
7function! GetHighlightGroupName()
8 let l:syntaxID = synID(line('.'), col('.'), 1)
9 let l:groupName = synIDattr(l:syntaxID, 'name')
10 echo "Highlight Group Name: " . l:groupName
11endfunction
12
13" Defualt highlight for matched parenthesis is so weird in many colorscheme
14" Why the background color is lighter than my caret !?
15highlight MatchParen ctermfg=NONE ctermbg=darkgrey cterm=NONE
16highlight LuaParen ctermfg=NONE ctermbg=darkgrey cterm=NONE
17
18" Show trailing spaces
19highlight ExtraWhitespace ctermbg=red guibg=red
20match ExtraWhitespace /\s\+$/
21
22" Persist visualized lines
23" define line highlight color
24highlight MultiLineHighlight ctermbg=LightYellow guibg=LightYellow ctermfg=Black guifg=Black
25" highlight the current line
26nnoremap <silent> <leader><leader>h :call matchadd('MultiLineHighlight', '\%'.line('.').'l')<CR>
27" clear all the highlighted lines
28nnoremap <silent> <leader><leader>H :call clearmatches()<CR>