1. 程式人生 > >Ubuntu 16.04配置安裝YouComPleteMe等外掛

Ubuntu 16.04配置安裝YouComPleteMe等外掛

set nocompatible filetype off set rtp+=~/.vim/bundle/vundle set rtp+={repository_root}/powerline/bindings/vim call vundle#rc() Bundle 'gmarik/vundle' Bundle 'Valloric/YouCompleteMe' Bundle 'Valloric/ListToggle' Bundle 'scrooloose/syntastic' Bundle 'scrooloose/nerdtree' Bundle 'klen/python-mode' Bundle 'croaky/vim-colors-github'
Bundle 'danro/rename.vim' Bundle 'majutsushi/tagbar' Bundle 'kchmck/vim-coffee-script' Bundle 'kien/ctrlp.vim' Bundle 'pbrisbin/vim-mkdir' Bundle 'slim-template/vim-slim' Bundle 'thoughtbot/vim-rspec' Bundle 'tpope/vim-bundler' Bundle 'tpope/vim-endwise' Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-rails' Bundle 'tpope/vim-surround'
Bundle 'vim-ruby/vim-ruby' Bundle 'vim-scripts/ctags.vim' Bundle 'vim-scripts/matchit.zip' Bundle 'vim-scripts/tComment' Bundle "mattn/emmet-vim" Bundle "Lokaltog/vim-powerline" Bundle "godlygeek/tabular" Bundle "msanders/snipmate.vim" Bundle "jelera/vim-javascript-syntax" Bundle "altercation/vim-colors-solarized"
Bundle "othree/html5.vim" Bundle "xsbeats/vim-blade" Bundle "Raimondi/delimitMate" Bundle "groenewege/vim-less" Bundle "evanmiller/nginx-vim-syntax" Bundle "Lokaltog/vim-easymotion" Bundle "tomasr/molokai" filetype plugin indent on """"""""""""""""""""" Vundle """""""""""""""""""""""""""""""""""""""基本設定"""""""""""""""""""""""""""""""""""""""" " 設定預設解碼 set fenc=utf-8 set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936 " 支援256色,使得vim配色支援終端 set t_Co=256 " C縮排 set smartindent set cindent " 設定背景和字型 colorscheme molokai set guifont=Source\ Code\ Pro\ 12 " 不要使用vi的鍵盤模式,而是vim自己的 set nocompatible " history檔案中需要記錄的行數 set history=1000 " 在處理未儲存或只讀檔案的時候,彈出確認 set confirm " 與windows共享剪貼簿 set clipboard+=unnamed " 偵測檔案型別 filetype off " 為特定檔案型別載入相關縮排檔案 filetype indent on " 帶有如下符號的單詞不要被換行分割 set iskeyword+=_,$,@,%,#,- " 語法高亮 syntax enable syntax on "隱藏GUI的工具欄 set guioptions=P " 不要備份檔案 set nobackup " 不要生成swap檔案 setlocal noswapfile " 字元間插入的畫素行數目 set linespace=0 " 在狀態行上顯示游標所在位置的行號和列號 set ruler " 命令列(在狀態行下)的高度,預設為1,這裡是2 set cmdheight=2 " 使回格鍵(backspace)正常處理indent, eol, start等 set backspace=indent,eol,start " 允許backspace和游標鍵跨越行邊界 set whichwrap+=<,>,b,s,[,] " 高亮顯示匹配的括號 set showmatch " 匹配括號高亮的時間(單位是十分之一秒) set matchtime=5 " 在搜尋的時候忽略大小寫 set ignorecase " 不要高亮被搜尋的句子(phrases) set nohlsearch " 在搜尋時,輸入的詞句的逐字元高亮(類似firefox的搜尋) set incsearch " 游標移動到buffer的頂部和底部時保持3行距離,視窗滾動最小距離 set scrolloff=3 " 2為總顯示最後一個視窗的狀態行 " 設為1則視窗數多於一個的時候顯示最後一個視窗的狀態行; " 0不顯示最後一個視窗的狀態行 set laststatus=2 " 繼承前一行的縮排方式,特別適用於多行註釋 ""set autoindent " 顯示行號 set number " 製表符為4 set tabstop=4 " 統一縮排為4 set softtabstop=4 set shiftwidth=4 " 不要用空格代替製表符 set noexpandtab " 不要換行 " set nowrap " set sidescroll=10 " 在行和段開始處使用製表符 set smarttab " Ctrl+A全選,Ctrl+C複製,Ctrl+V貼上 map <C-A> ggvG$ imap <C-A> <Esc>ggvG$ vmap <C-C> "+y<Esc> map <C-V> "+p imap <C-V> <Esc>"+pa " 括號等的自動匹配 inoremap ( ()<Esc>i inoremap [ []<Esc>i inoremap { {}<Esc>i inoremap ' ''<Esc>i inoremap " ""<Esc>i " 設定<leader>和<localleader> let mapleader = "," let maplocalleader = "." " 可以摺疊 set foldenable set foldmethod=manual " 自動更新.vimrc map <leader>vo <Esc>:vsp ~/.vimrc<CR> """""""""""""""""""""""""""""""""""""""基本設定"""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""" " NERD Tree外掛 " """"""""""""""""""""""""""""""""""""" nmap <F2> :NERDTreeToggle<cr> " F2開啟目錄樹 let g:NERDTreeWinSize=30 " 目錄樹橫向大小 let NERDChristmasTree=0 let NERDTreeChDirMode=2 let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$'] let NERDTreeShowBookmarks=1 let NERDTreeWinPos="left" " Automatically open a NERDTree if no files where specified autocmd vimenter * if !argc() | NERDTree | endif " Close vim if the only window left open is a NERDTree autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif """"""""""""""""""""""""""""""""""""" " Tagbar 外掛 " """"""""""""""""""""""""""""""""""""" map tb <Esc>:Tagbar <CR> " tb用於開啟tagbar let g:tagbar_width=30 let g:tagbar_autofocus=1 let g:Powerline_symbols = 'fancy' """"""""""""""""""""""""""""""""""""" " 主題顏色 " """"""""""""""""""""""""""""""""""""" let g:molokai_original = 1 let g:rehash256 = 1 " Color scheme colorscheme molokai highlight NonText guibg=#060606 highlight Folded guibg=#0A0A0A guifg=#9090D0 set rtp+={repository_root}/powerline/bindings/vim """"""""""""""""""""""""""""""""""""" " ctags外掛 " """"""""""""""""""""""""""""""""""""" set tags=./tags,./../tags,./*/tags "--這樣的設定可以生成當前目錄,上級目錄以及當前目錄的所有子目錄的tags檔案 map <F7> <Esc>:!sudo ctags -R <CR><CR> """"""""""""""""""""""""""""""""""""" " powerline外掛 " """"""""""""""""""""""""""""""""""""" set guifont=PowerlineSymbols\ for\ Powerline set nocompatible set laststatus=2 set t_Co=256 let g:Powerline_symbols = 'fancy' let Powerline_symbols='compatible' """"""""""""""""""""""""""""""""""""" " YouComPleteMe外掛 " """"""""""""""""""""""""""""""""""""" let mapleader = '\' nnoremap <leader>gg :YcmCompleter GoToDeclaration<CR> " 跳轉到宣告處 nnoremap <leader>gd :YcmCompleter GoToDefinition<CR> """"""""""""""""""""""""""""""""""""""""C語言的編譯執行""""""""""""""""""""""""""""""""""""""""" " <F5>編譯C/py語言,<F6>執行 augroup ccompile autocmd Filetype c map <F5> <Esc>:w<CR>:!gcc % -std=c99 -g -o %< -lm <CR> autocmd Filetype cpp map <F5> <Esc>:w<CR>:!g++ % -std=c++11 -g -o %< -lm <CR> autocmd Filetype python map <F5> <Esc>:w<CR>:!python2 % <CR> autocmd Filetype python map <F5> <Esc>:w<CR>:!python3 % <CR> augroup END augroup crun autocmd Filetype c map <F6> <Esc>:! ./%< <CR> autocmd Filetype cpp map <F6> <Esc>:! ./%< <CR> augroup END " 整行註釋 augroup comment autocmd Filetype c noremap <buffer> <localleader>/ I//<Esc> autocmd Filetype cpp noremap <buffer> <localleader>/ I//<Esc> autocmd Filetype h noremap <buffer> <localleader>/ I//<Esc> augroup END augroup nocomment autocmd Filetype c noremap <buffer> <localleader>. ^xx autocmd Filetype cpp noremap <buffer> <localleader>. ^xx autocmd Filetype h noremap <buffer> <localleader>. ^xx augroup END " 大括號補全 autocmd Filetype c,cpp,h inoremap {<CR> {<CR>}<Esc>O """"""""""""""""""""""""""""""""""""""""C語言的編譯執行""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""新檔案標題"""""""""""""""""""""""""""""""""""""""""""""""" "新建.c,.h,.sh,.java檔案,自動插入檔案頭 autocmd BufNewFile *.py,*.cpp,*.[ch],*.sh,*.java exec ":call SetTitle()" ""定義函式SetTitle,自動插入檔案頭 func SetTitle() "如果檔案型別為.sh檔案 if &filetype == 'sh' call setline(1,"\#########################################################################") call append(line("."), "\# File Name: ".expand("%")) call append(line(".")+1, "\# Author: King") call append(line(".")+2, "\# mail: [email protected]163.com") call append(line(".")+3, "\# Created Time: ".strftime("%c")) call append(line(".")+4, "\#########################################################################") call append(line(".")+5, "\#!/bin/bash") call append(line(".")+6, "") elseif &filetype == 'python' call setline(1,"\#########################################################################") call append(line("."), "\# File Name: ".expand("%")) call append(line(".")+1, "\# Author: King") call append(line(".")+2, "\# mail: [email protected]163.com") call append(line(".")+3, "\# Created Time: ".strftime("%c")) call append(line(".")+4, "\#########################################################################") call append(line(".")+5, "\#!/usr/bin/env python3") call append(line(".")+6, "\#! -*- coding: utf-8 -*-") else call setline(1, "/*************************************************************************") call append(line("."), " > File Name: ".expand("%")) call append(line(".")+1, " > Author: King") call append(line(".")+2, " > Mail: [email protected]163.com ") call append(line(".")+3, " > Created Time: ".strftime("%c")) call append(line(".")+4, " ************************************************************************/") call append(line(".")+5, "") endif if &filetype == 'cpp' call append(line(".")+6, "#include<iostream>") call append(line(".")+7, "using namespace std;
")

相關推薦

Ubuntu 16.04配置安裝YouComPleteMe外掛

set nocompatible filetype off set rtp+=~/.vim/bundle/vundle set rtp+={repository_root}/powerline/bindings/vim call vundle#rc() Bundle 'gmarik/vundle'

Ubuntu 16.04 配置安裝 Tensorflow Gpu版本

Ubuntu 16.04 配置安裝 Tensorflow Gpu版本 1、安裝CUDA8.0 2、更改gcc版本 3、安裝深度學習庫cuDNN 4、安裝 Tensorflow Gpu enable python 2.7 版本

ubuntu 16.04 系統安裝、環境配置

ubuntu 16.04 系統安裝、環境配置 注:文中很多內容是參考別人的部落格,都已註明出處,如果侵權,請私信。 初次寫部落格,這篇內容就屬性定義為原創了。 其實定義成原創很不好意思。所以隨便轉載吧。但請註明一下出處。 https://blog.csdn.net/qq_26

並行作業2:Ubuntu(16.04)下安裝配置hadoop(2.7.3)

Ubuntu(16.04)下安裝配置hadoop(2.7.3) 系統採用vm下ubuntu16.04 一、Java環境搭建(參考我的其它部落格) 二、安裝ssh-server並實現免密碼登入 1、下載安裝ssh-server sudo apt-get install op

ubuntu 16.04配置1:ubuntu安裝的進入時區時卡死的問題

       ubuntu 16.04安裝好了之後,需要配置一下ip等等各種事就自行查詢資料了,推薦如下兩個ubuntu安裝包下載地址。(ps: 本人一剛開始接觸linux的時候,就使用的ubuntu,

Ubuntu 16.04 LTS 安裝RealSense R200 驅動以及SDK配置+QT+OpenCV

一、安裝列表 1)CMake 3.8.2 2)RealSense 驅動 3)RealSense SDK 4)QT 5)OpenCV 二、具體步驟 1.CMake 3.8.2安裝 1)下載cmake-3.8.2.tar.gz : https://cmake.org/download/ 這裡寫圖

ubuntu 16.04 SS安裝配置

安裝SS客戶端 安裝pip3 一般情況下,pip3安裝的版本比pip安裝的新,pip安裝的版本比apt安裝的新,這裡選擇最新版本。 1 sudo apt install python3-pip 安裝SS pip3命令一定要用sudo,不然開機自啟動不能實現。 1 sudo pip3

Ubuntu 16.04安裝配置Tomcat 8

出處:原始連結 簡介 Tomcat 是被廣泛使用的開源web伺服器,它具有輕量級、使用簡單靈活的優點,並且具有大量外掛的生態系統。本文帶你瞭解在Ubuntu 16.04上如何安裝和配置Tomcat 8。 你需要 Ubuntu 16.04伺服器 sudo許可權的非root使

ubuntu 16.04 手動安裝sublime text (3143) + 配置anaconda

1、官方下載64為sublime text 3143(日期:20180131)網址:http://www.sublimetext.com/32、解壓  # cd Downloads # tar  -jxvf  sublime_*3、移動安裝包到/opt/目錄下# sudo 

ubuntu 16.04安裝和簡單配置MySQL(5.7版本)

1.在ubuntu安裝MySQL(根據個人需求安裝server和client)sudo apt-get install mysql-serversudo apt-get install mysql-cl

如何在Ubuntu 16.04安裝配置Postfix作為只發送SMTP伺服器

內容介紹 Postfix是一套郵件傳輸代理(簡稱MTA),用於傳送並接收郵件。在本教程中,我們將安裝並配置Postfix,並利用它僅為本地應用傳送郵件——所謂本地應用,即與Postfix安裝於同一伺服器的應用。 為什麼有這樣的需求? 如果大家已經在使用

ubuntu 16.04安裝jdk-8u181並配置環境變數

1.到官網下載對應的jdk的包。我下的是jdk-8u181-linux-x64.tar.gz 2.解壓 執行tar zvxf jdk-8u181-linux-x64.tar.gz解壓獲得資料夾jdk1.8.0_181 3.建立安裝目錄 sudo mkdir /op

Ubuntu 16.04 LTS 安裝 miniconda

mini style 3.6 nbsp 設置 cond 根據 下載鏈接 inux Ubuntu 16.04 LTS 安裝 miniconda 下載 miniocnda 的 bash 文件下載鏈接 https://conda.io/miniconda.html ,我選擇的是

Ubuntu 16.04 LTS 安裝libvips出現”Package vips was not found in the pkg-config search path”

arp dir exp export ron per gconf 部署 director 使用libvips來操作圖像,libvips的部署參考一個Node.js工程:https://github.com/lovell/sharp 在MAC下安裝很順利,到Linux環境下(

Ubuntu 16.04 LTS安裝Mattermost

mattermost 安裝 setup install 可以在一臺到三臺機器上安裝產品級別的Mattermost系統;主要有三個重要組件:proxy、數據庫、Mattermost;可以把它們安裝在一臺機器上或者各自一臺,如果只有兩臺機器,那麽可以把proxy和Mattermost安裝在

Ubuntu 16.04安裝nodejs

.cn ges ubuntu 技術 com apt-get 分享 6.0 images 源安裝: 1.curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - 2.sudo apt-get insta

Ubuntu 16.04 編譯安裝 ss

ast logs sha timeout odi http end ibm 大小 在網上沒有找到合適的適合ubuntu的ss客戶端, 考慮到ss的編譯安裝其實就帶了ss-local這樣的客戶端, 於是在Ubuntu下編譯安裝了ss. 首先去github上下載最新的安裝包 h

Ubuntu 16.04 LTS安裝Mattermost(二)

mattermost 在Ubuntu 16.04 LTS安裝Mattermost(一) 在Ubuntu 16.04 LTS安裝Mattermost(二)配置Mattermost 創建系統管理員用戶,設置Mattermost的一般用途 .打開瀏覽器,導航到Mattermost實例.比如:Matter

Ubuntu 16.04安裝 Bro 網絡分析器

linuxBro 是一個開源的網絡分析框架,側重於網絡安全監控。這是一項長達 15 年的研究成果,被各大學、研究實驗室、超級計算機中心和許多開放科學界廣泛使用。它主要由伯克利國際計算機科學研究所和伊利諾伊大學厄巴納-香檳分校的國家超級計算機應用中心開發。Bro 的功能包括:Bro 的腳本語言支持針對站點定制監

Ubuntu 16.04配置VNC進行遠程桌面連接

vncserver sans owin orm -i 虛擬 其中 str 殺死 說明:其實要裝VNC還不如裝個Teamview來的快一些,並且全平臺支持。 1、安裝 $sudo apt-get install xfce4 $sudo apt-get instal