當前位置:
首頁 > 知識 > 打造一款高逼格的Vim神器

打造一款高逼格的Vim神器

Vim 是一個上古神器,本篇文章主要持續總結使用 Vim 的過程中不得不了解的一些指令和注意事項,以及持續分享一個前端工作者不得不安裝的一些插件,而關於 Vim 的簡介,主題的選擇,以及為何使用 vim-plug 來管理插件等內容,有興趣的同學下來可以自己了解和對比下。 -- 楓上霧棋

本文導航

安裝

03%

新手指南

04%

移動游標

05%

退出

08%

刪除

08%

修改

10%

撤銷

11%

複製粘貼剪切

12%

狀態

13%

查找

13%

替換

15%

摺疊

16%

執行外部命令

17%

.vimrc

18%

基本配置

23%

取消備份

23%

文件編碼

23%

顯示行號

24%

取消換行

24%

顯示游標當前位置

25%

設置縮進

25%

突出顯示當前行

26%

查找

27%

左下角顯示當前 vim 模式

27%

代碼摺疊

28%

主題

29%

插件配置

32%

樹形目錄

32%

代碼,引號,路徑補全

46%

語法高亮,檢查

50%

文件,代碼搜索

56%

加強版狀態欄

59%

代碼注釋

63%

git

69%

Markdown

71%

Emmet

74%

html 5

76%

css 3

77%

JavaScipt

82%

React

91%

Prettier

93%

總結

97%

安裝

其他平台,可以自行谷歌。

新手指南

上面是史上最簡單,最全面的Vim基礎教程,至今無人超越。

下面是作者基於上面的歸納:

移動游標

退出

刪除

修改

撤銷

狀態

替換

摺疊

執行外部命令

.vimrc

.vimrc 是 Vim 的配置文件,需要我們自己創建:

其他平台,可以查看 vim-plug[1]。

基本配置取消備份

文件編碼

顯示行號

取消換行

顯示游標當前位置

設置縮進

突出顯示當前行

查找

左下角顯示當前vim模式

代碼摺疊

主題

altercation/vim-colors-solarized[2]

Anthony25/gnome-terminal-colors-solarized[3]

插件配置樹形目錄

scrooloose/nerdtree[4]

vim-nerdtree-tabs[5]

nerdtree-git-plugin[6]

代碼,引號,路徑補全

Valloric/YouCompleteMe[7]

Raimondi/delimitMate[8]

Shougo/deoplete.nvim[9]

語法高亮,檢查

w0rp/ale[10]

sheerun/vim-polyglot[11]

文件,代碼搜索

kien/ctrlp.vim[12]

ggreer/the_silver_searcher[13]

rking/ag.vim[14]

加強版狀態欄

vim-airline/vim-airline[15]

vim-airline/vim-airline-themes[16]

代碼注釋

scrooloose/nerdcommenter[17]

git

airblade/vim-gitgutter[18]

tpope/vim-fugitive[19]

Markdown

suan/vim-instant-markdown[20]

Emmet

mattn/emmet-vim[21]

html 5

othree/html5.vim[22]

css 3

hail2u/vim-css3-syntax[23]

ap/vim-css-color[24]

JavaScipt

pangloss/vim-javascript[25]

(註:上述腳本中存在特殊字元,有的情況下顯示不正確,請直接用上述鏈接的內容。)

React

mxw/vim-jsx[26]

Prettier

prettier/vim-prettier[27]

總結

最後,呈上參考配置 .vimrc[28],如果關於 vim 有更好的 idea,歡迎在評論中交流。

[1]: https://github.com/junegunn/vim-plug

[2]: https://github.com/altercation/vim-colors-solarized

[3]: https://github.com/Anthony25/gnome-terminal-colors-solarized

[4]: https://github.com/scrooloose/nerdtree

[5]: https://github.com/jistr/vim-nerdtree-tabs

[6]: https://github.com/Xuyuanp/nerdtree-git-plugin

[7]: https://github.com/Valloric/YouCompleteMe

[8]: https://github.com/Raimondi/delimitMate

[9]: https://github.com/Shougo/deoplete.nvim

[10]: https://github.com/w0rp/ale

[11]: https://github.com/sheerun/vim-polyglot

[12]: https://github.com/kien/ctrlp.vim

[13]: https://github.com/ggreer/the_silver_searcher

[14]: https://github.com/rking/ag.vim

[15]: https://github.com/vim-airline/vim-airline

[16]: https://github.com/vim-airline/vim-airline-themes

[17]: https://github.com/scrooloose/nerdcommenter

[18]: https://github.com/airblade/vim-gitgutter

[19]: https://github.com/tpope/vim-fugitive

[20]: https://github.com/suan/vim-instant-markdown

[21]: https://github.com/mattn/emmet-vim

[22]: https://github.com/othree/html5.vim

[23]: https://github.com/hail2u/vim-css3-syntax

[24]: https://github.com/ap/vim-css-color

[25]: https://github.com/pangloss/vim-javascript

[26]: https://github.com/mxw/vim-jsx

[27]: https://github.com/prettier/vim-prettier

[28]: https://github.com/FengShangWuQi/to-vim/blob/master/.vimrc

原文來自Linux中國:https://linux.cn/article-8997-1.html


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 Linux資訊速推 的精彩文章:

Linux運行速度太慢的關鍵原因全都在這了
據說看完這篇文章相當於對話了40+技術大牛

TAG:Linux資訊速推 |