转:https://linux.cn/article-6610-1.html
作为一款古老而具有持久生命力的编辑器,Vim 自有它的强大之处。很多人觉得 Vim 的学习曲线太陡峭了,为了能够把 Vim 用得风生水起,不得不记忆大量的命令。如果你是 Vim 新手,刚入门就开始面对着浩如烟海的命令逐条学习,我相信你一定会逐渐失去对它的兴趣。其实,Vim 以一种近乎自然语言的方 >查看详情
root@bananapi /home/pi # cat /etc/vim/vimrc
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" >查看详情
set wrap
换行
Go to the 143rd line of file
$ vim +143 filename.txt
Go to the first match of the specified
$ vim +/search-term filename.txt
Open the file in read >查看详情
https://stackoverflow.com/questions/14171254/why-would-vim-add-a-new-line-at-the-end-of-a-file
I work with wordpress a lot, and sometimes I changed wordpress core files temporarily in ord >查看详情
https://cloud.tencent.com/developer/ask/115418
还可以添加持久撤消,这将使VIM存储您的撤消,即使通过重新启动:
" Persistent undo
set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000
>查看详情