状态栏美化
除了airline本体还要下
和打过powerline补丁的字体常用设置:
set laststatus=2 " 总是显示状态栏set noshowmodeset t_Co=256 " 显示颜色"let g:airline_theme="badwolf"let g:airline_theme="gruvbox""let g:airline_theme="one"if !exists('g:airline_symbols') let g:airline_symbols = {}endiflet g:airline_powerline_fonts = 1 " 使用powerline打过补丁的字体let g:airline#extensions#tabline#enabled = 1 " 开启tabline"let g:airline#extensions#tabline#left_sep = ' ' " tabline中当前buffer两端的分隔字符"let g:airline#extensions#tabline#left_alt_sep = '|' " tabline中未激活buffer两端的分隔字符"let g:airline#extensions#tabline#buffer_nr_show = 1 " tabline中buffer显示编号let g:airline#extensions#tabline#formatter = 'unique_tail' " 显示标签的样式为只显示文件名
nerdcommenter 代码注释
常用设置:
let g:NERDSpaceDelims = 1 " Add spaces after comment delimiters by defaultlet g:NERDCompactSexyComs = 1 " Use compact syntax for prettified multi-line commentslet g:NERDDefaultAlign = 'left' " Align line-wise comment delimiters flush left instead of following code indentation" let g:NERDAltDelims_java = 1 " Set a language to use its alternate delimiters by default" let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } } " Add your own custom formats or override the defaultslet g:NERDCommentEmptyLines = 1 " Allow commenting and inverting empty lines (useful when commenting a region)let g:NERDTrimTrailingWhitespace = 1 " Enable trimming of trailing whitespace when uncommentinglet g:NERDToggleCheckAllLines = 1 " Enable NERDCommenterToggle to check all selected lines is commented or not
高亮单词
Basic Usage:
m : 高亮鼠标选中的单词
n : 取消高亮鼠标选中的单词,若鼠标没有选中任何单词,则取消所有高亮的单词Basic Usage:
mx - Toggle mark 'x' and display it in the leftmost column
dmx - Remove mark 'x' where x is a-zA-Z m - Delete all marks from the current bufferm/ - Open location list and display marks from current buffer
m[0-9] - Toggle the corresponding marker !@#$%^&*() m? - Open location list and display markers from current buffer m - Remove all markers
文件搜索
Basic Usage:
Run :CtrlP or :CtrlP [starting-directory] to invoke CtrlP in find file mode.
Run :CtrlPBuffer or :CtrlPMRU to invoke CtrlP in find buffer or find MRU file mode. F5 :刷新缓存文本搜索
Basic Usage:
vv - Grep for the word under the cursor, match all occurences,
like |gstar|vV - Grep for the word under the cursor, match whole word, like |star|va - Like vv, but add to existing listvA - Like vV, but add to existing listvr - Perform a global search on the word under the cursor and prompt for a pattern with which to replace it.
备用:
先要安装