vim-complete
17期 2012年4月15日

vim-complete

本集介绍vim的自动补齐功能。主要有英文单词补齐以及纠错。代码“万能补齐”,Ctrl-N, Ctrl-X-L等。
terminal
vim --version|head -n 1
lsb_release -a
vim
:h i_CTRL-X_CTRL-K
:h i_CTRL-X_CTRL-L
:h i_CTRL-X_CTRL-F
:h i_CTRL-X_s
:h i_CTRL-N
:h new-omni-completion
~/.vim/snippets/css.snippets
snippet tag
    ${1:name} {
      ${2:attr:} ${3:value};
    }
~/.vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""
"
"       ignore case for i_Ctrl-N
"
"""""""""""""""""""""""""""""""""""""""""""""""""
set ic

"""""""""""""""""""""""""""""""""""""""""""""""""
"
"       set dictionary to use i_Ctrl-X_Ctrl-K
"
"""""""""""""""""""""""""""""""""""""""""""""""""
set dictionary+=/usr/share/dict/words

"""""""""""""""""""""""""""""""""""""""""""""""""
"
"       i_Ctrl-X_s won't work without spell-checking enabled
"
"""""""""""""""""""""""""""""""""""""""""""""""""
"Pressing ,ss will toggle and untoggle spell checking
map ,ss :setlocal spell!<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""
"
"       :h new-omini-complete
"
"""""""""""""""""""""""""""""""""""""""""""""""""
filetype plugin on

"""""""""""""""""""""""""""""""""""""""""""""""""
"
"       Just for fun
"
"""""""""""""""""""""""""""""""""""""""""""""""""
ia xdate  <c-r>=strftime("%d/%m/%y %H:%M:%S")<cr>
ia myname <c-r>%<cr>
happypeter 11 个月前

people also recommended autoclose

lcqtdwj 10 个月前

请问为什么“到优酷观看”是一个表单,有什么目的吗?因为我想新打开一个tab观看,不是链接拖不了

happypeter 10 个月前

@lcqtdwj It's because I use button_to in the code, which is stupid. Thx for the info, now fixed.