/Simple-Remote-Vim

Simple vim configurations for remote coding in Python

Primary LanguageVim Script

Simple-Remote-Vim

Simple vim configurations for remote coding in Python, heavily based on vim-for-server, are developed by incorporating few practical plugins and better python syntax highlight (python.vim).

Install

  1. Back up the original .vimrc

    cp ~/.vimrc ~/.vimrc_backup
    
  2. Use Vundle to manage vim plugins

    git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
    
  3. Clone these dotfiles and put them into right places

    git clone https://github.com/haibo-qiu/Simple-Remote-Vim
    cp Simple-Remote-Vim/.vimrc ~/.vimrc
    
    mkdir -p ~/.vim/after/syntax/
    cp Simple-Remote-Vim/python.vim ~/.vim/after/syntax/python.vim
    

    Note that python.vim is to highlight Python function properly.

  4. Launch vim and run :PluginInstall to install plugins.

Plugins

For basic configurations and mappings in .vimrc, please refer to this blog for detailed explanations.

Several adopted plugins are introduced as follows:

  1. vim-syntastic/syntastic: make sure flake8 is installed (pip install flake8), and <F7> is for syntax checking.
  2. tell-k/vim-autopep8: autopep8 is required (pip install autopep8), and <F8> is for autopep8 formatting.
  3. preservim/nerdtree: a file system explorer by <ctrl-n>.
  4. preservim/nerdcommenter: for visual black, ,cc and ,cu are for commenting and uncommenting separately.
  5. Xuyuanp/nerdtree-git-plugin: show git status flags for nerdtree file explorer.
  6. vim-airline/vim-airline: a nice statusline at the bottom of vim window.
  7. vim-airline/vim-airline-themes: various themes for vim-airline.
  8. ctrlpvim/ctrlp.vim: a fuzzy file finder with ,p.
  9. tpope/vim-fugitive: use arbitrary Git commands in vim command line, e.g., :Git status -s.

Note that there is no semantic autocompletion plugin in this .vimrc. if your vim is compiled with python3 support, jedi-vim would be a good choice. To pursue a even better experience in autocompletion (e.g., LSP support) like vscode, coc.nvim can be considered, which, however, requires vim8 or neovim.

Next Station: Neovim

Resources for learning and configuring neovim:

Well-developed IDE-like neovim configurations: