Ubuntu 下一个 vim 建立python 周围环境 构造
于Windows通過使用各種現成的工具使用,去Linux下一個,沒有一個關于線索……總之google有些人的經驗,折騰來折騰,開發環境也算是一個好工作。
1. 安裝完成vim
# apt-get install vim-gnome
2. 安裝ctags,ctags用于支持taglist,必需!
# apt-get install ctags
3. 安裝taglist
#apt-get install vim-scripts
#apt-get install vim-addon-manager // 貌似我在安裝vim-scripts的時候,已經附帶安裝了vim-addon-manager
# vim-addons install taglist
4. 安裝pydiction(實現代碼補全)
#wget http://www.pythonclub.org/_media/python-basic/pydiction-1.2.zip
#unzip pydiction-1.2.zip
// ~/.vim/after/ftplugin和~/.vim/tools/pydiction/文件夾默認不存在。須要自行創建
#cp pydiction-1.2/python_pydiction.vim ~/.vim/after/ftplugin
#cp pydiction-1.2/complete-dict ~/.vim/tools/pydiction/complete-dict
5. 編輯配置文件
# vim ~/.vimrc
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | let Tlist_Auto_Highlight_Tag=1? let Tlist_Auto_Open=1? let Tlist_Auto_Update=1? let Tlist_Display_Tag_Scope=1? let Tlist_Exit_OnlyWindow=1? let Tlist_Enable_Dold_Column=1? let Tlist_File_Fold_Auto_Close=1? let Tlist_Show_One_File=1? let Tlist_Use_Right_Window=1? let Tlist_Use_SingleClick=1? nnoremap <silent> <F8> :TlistToggle<CR>? // 設定F8為taglist開關 ??? filetype plugin on? autocmd FileType python set omnifunc=pythoncomplete#Complete? autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS? autocmd FileType html set omnifunc=htmlcomplete#CompleteTags? autocmd FileType css set omnifunc=csscomplete#CompleteCSS? autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags? autocmd FileType php set omnifunc=phpcomplete#CompletePHP? autocmd FileType c set omnifunc=ccomplete#Complete? ??? ??? let g:pydiction_location='~/.vim/tools/pydiction/complete-dict'? set autoindent // 實現自己主動縮進 set tabstop=4? set shiftwidth=4? set expandtab? set number |
至此,python IDE的環境就算是搭好了。來張完畢圖:
右邊即為taglist窗體,按F8打開,使用Ctrl+w,再按w能夠在code窗體和taglist窗體間切換。
nerdtree
一 安裝方法
二 經常使用設置
NERDTree 開啟需輸入 :NERDTree。關閉時按?q?就可以。也能夠增加快捷鍵開啟
| 1 | nnoremap <silent> <F5> :NERDTree<CR> |
三 我覺得經常使用的快捷鍵
ctrl + w + w 光標自己主動在左右側窗體切換 o 展開左側某個文件夾。再按一下就是合并文件夾 t 在新 Tab 中打開選中文件/書簽,并跳到新 Tab T 在新 Tab 中打開選中文件/書簽,但不跳到新 Tab P 跳到根結點 p 跳到父結點 q 關閉 NerdTree 窗體
更全面的快捷鍵請參考:http://yang3wei.github.io/blog/2013/01/29/nerdtree-kuai-jie-jian-ji-lu/
四 效果圖
版權聲明:本文博主原創文章。博客,未經同意不得轉載。
轉載于:https://www.cnblogs.com/blfshiye/p/4850168.html
總結
以上是生活随笔為你收集整理的Ubuntu 下一个 vim 建立python 周围环境 构造的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: css样式之背景图片
- 下一篇: 拿去花怎么不能用了 网传因为这四大原因