ubuntu16.04の構成、造園やvimの設定

ubuntu16.04設定

Vimをインストールします。

sudo apt-get install vim-gnome

他のソースで

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo vim /etc/apt/sources.list

また清華出典:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

最後に、sudo apt-get updateソース効果。

Chromeをインストールします。

sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list.d/
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-stable

オプションのソフトウェア

Typora

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update
sudo apt-get install typora

VsCode

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake ide visual-studio-code

KolourPaint

sudo apt-get install kolourpaint4

QQMARPDeals2buy -クラウド音楽Sougou入力WPSOffice、......

ubuntu16.04美化

名門フラット話題とMac風のマウスポインタを使用します:

sudo add-apt-repository ppa:noobslab/themes
sudo add-apt-repository ppa:noobslab/icons
sudo add-apt-repository ppa:noobslab/macbuntu
sudo apt-get update 
sudo apt-get install arc-flatabulous-theme
sudo apt-get install ultra-flat-icons
sudo apt-get install macbuntu-os-icons-lts-v7
sudo apt-get install macbuntu-os-ithemes-lts-v7
sudo apt-get install unity-tweak-tool

最後に、ユニティ微調整ツール、オープン作業領域に該当するトピックを選択し、[タスクバーを自動的に隠します。

vimの設定

インストールが依存します

sudo apt-get install cmake
sudo apt-get install clang
sudo apt-get install curl

システムプリインストールのpythonがあります。

インストールのapt-VIM、ctagsは、nerdtreeとYouCompleteMe

sudo apt-get install ctags
curl -sL https://raw.githubusercontent.com/egalpin/apt-vim/master/install.sh | sh
source ~/.bashrc || source ~/.bash_profile
apt-vim install -y https://github.com/scrooloose/nerdtree.git
apt-vim install -y  https://github.com/Valloric/YouCompleteMe.git
cd /home/<username>/.vim/bundle/YouCompleteMe
git submodule update --init --recursive
./install.py --clang-completer

githubのが遅くダウンロードした場合は、下記のYouCompleteMe国内のルートを提供します。

apt-vim install -y  https://gitee.com/chy-2003/YouCompleteMe.git

以下のためのgit submodule update --init --recursive問題解決の文:

国内のアクセス速度に主に起因するGithubのが遅すぎます。これは、することができます.gitmoluleし、.git/configそれぞれのソースで、以下のソースに置き換え:

ycmd: https://gitee.com/chy-2003/ycmd

urllib3: https://gitee.com/chy-2003/urllib3

GO语言FQ必要なパッケージgolang.org/x/toolshttps://gitee.com/chy-2003/tools.git): 。https://github.com/golang/tools.gitのアドレス:

を伴います.vimrc

syntax on
set mouse=a
 
set number
set so=100
set autoindent
set cindent
 
set tabstop=4
set softtabstop=4
set shiftwidth=4
set cino=g0,:0
 
let g:tagbar_width=35
let g:tagbar_ctags_bin='/usr/bin/ctags'  
let g:tagbar_right=1
let g:tagbar_autofocus=0
autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx call tagbar#autoopen() 
nmap <F6> :TagbarToggle<CR> 

let NERDChristmasTree=0
let NERDTreeWinSize=35
let NERDTreeChDirMode=2
let NERDTreeIgnore=['\~$']
let NERDTreeShowBookmarks=1
let NERDTreeWinPos="left"
autocmd vimenter * if !argc() | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nmap <F5> :NERDTreeToggle<cr>

let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_complete_in_comments = 1
let g:ycm_collect_identifiers_from_comments_and_strings = 0
let g:ycm_complete_in_strings = 1
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_min_num_of_chars_for_completion = 2
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_cache_omnifunc=0
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
let g:ycm_seed_identifiers_with_syntax = 1  
let g:ycm_goto_buffer_command = 'horizontal-split'
nnoremap <Leader>g :YcmCompleter GoTo<CR>
 
execute pathogen#infect()
call pathogen#helptags()

(C ++用)YCM設定ファイル

作成~/.ycm_extra_conf.py(厳密な構文)次のように、:

flags = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-DNDEBUG',
'-std=c++11',
'-x',
'c++',
'-I',
'/usr/include',
'-isystem',
'/usr/lib/gcc/x86_64-linux-gnu/5/include',
'-isystem',
'/usr/include/x86_64-linux-gnu',
'-isystem'
'/usr/include/c++/5',
'-isystem',
'/usr/include/c++/5/bits'
]
def FlagsForFile(filename):
    return {'flags': flags}

.vimrcの追加

let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py'

それはすることができます。

おすすめ

転載: www.cnblogs.com/chy-2003/p/11298068.html