0
点赞
收藏
分享

微信扫一扫

190910-MacOS远程服务器Vim配置

耶也夜 2023-03-03 阅读 54


190910-MacOS远程服务器Vim配置_python

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'


举报

相关推荐

0 条评论