190910-MacOS远程服务器Vim配置

在这里插入图片描述
MacOS下需要修改的配置

修改编码方式

set encoding=utf-8 

修复delete删除操作

set backspace=indent,eol,start

修改Anaconda中envs里的python解释器的路径

let g:ycm_python_binary_path = '/opt/software/anaconda3/envs/dlteam/bin/python3.6'

配置好的~/.vimrc文件

set nocompatible              " be iMproved, required
filetype off                  " required
set encoding=utf-8
set backspace=indent,eol,start

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)

" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" cs Plugin
Plugin 'Valloric/YouCompleteMe'

" ==========Add Plugin beblow==========

" Class structure viewer
Plugin 'majutsushi/tagbar'

" Move like AceJump in Emacs
Plugin 'easymotion/vim-easymotion'

" Color scheme
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'

" File/folder navigation
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'

" Super searching
Plugin 'kien/ctrlp.vim'

" Powerful status bar
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}

" Out-of-box python development
"Plugin 'klen/python-mode'
"Plugin 'vim-syntastic/syntastic'
"Plugin 'nvie/vim-flake8'

" Git integration
"Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'

" Navigate between tmux and vim seamlessly
Plugin 'christoomey/vim-tmux-navigator'

" Add colorschemes to .vimrc
Plugin 'flazz/vim-colorschemes'

" ==========Add Plugin above==========



" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required


" ==========Config for Vim Operation==========
set encoding=utf-8


" give you the standard four spaces when you hit tab, ensure your line length
" doesn’t go beyond 80 characters
au BufNewFile,BufRead *.py
    \ set tabstop=4     |
    \ set softtabstop=4 |
    \ set shiftwidth=4  |
    "\ set textwidth=79  |
    \ set expandtab     |
    \ set autoindent
    "\ set fileformat=unix

" Autocomplete window goes away when you’re done with it
let g:ycm_autoclose_preview_window_after_completion=1

" F8 key will toggle the Tagbar window
nmap <F8> :TagbarToggle<CR>
let g:tagbar_width=50

" Easymotion: enhance default vim search by named jump and highlighting
":nmap <Space> <Leader><Leader>w
let g:EasyMotion_smartcase = 1
map  / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map  n <Plug>(easymotion-next)
map  N <Plug>(easymotion-prev)
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)

" Color. Fix scheme missing problem in tmux+iterm2
colorscheme zenburn
set background=dark
set t_Co=256

" Ignore files in NERDTree
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree

" Always use the directory you started vim in to search
let g:ctrlp_working_path_mode = 0

" For pymode or other syntatic plugin?
let python_highlight_all=1
syntax on
set nu
set autoread

" ==========Config for Vim Operation==========
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

" let g:ycm_python_binary_path  = '/home/brucelau/anaconda3/bin/python3.6'

let g:ycm_python_binary_path = '/opt/software/anaconda3/envs/dlteam/bin/python3.6'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

GuokLiu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值