Configurations for vim to share amongst machines
- vim installed with Python3 support: vim-nox
- Vundle extension manager to make installing the other plugins easy
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
touch ~/.vimrc
- (make sure to then run :PluginInstall in Vim)
- Screen (Not essential, but I list shortcuts for it below and like using it. Note that Screen is not a vim plugin)
sudo apt install screen
- Python3 basics needed
sudo apt install python3-pip
sudo pip3 install -U pip setuptools
- YouCompleteMe dependencies:
sudo apt-get install build-essential cmake
sudo apt-get install python-dev python3-dev
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer
- (look up the github for Valloric/YouCompleteMe for support for additional languages)
- Lokaltog/powerline plugin
pip3 install --user powerline-status
- python-rope/ropevim
- Needs the Rope library installed first:
sudo pip3 install Rope
- Needs the Rope library installed first:
- nvie/vim-flake8
- Needs flake8 instealled through python
sudo pip3 install flake8
- Needs flake8 instealled through python
- google/yapf
sudo pip3 install yapf
- majutsushi/tagbar
- Needs Exuberant Ctags installed alongside it:
sudo apt install exuberant-ctags
- Needs Exuberant Ctags installed alongside it:
- :PluginInstall
- :PluginList
- :Git (any normal Git command that comes after the word git)
- The <%> symbol means this file
- :Git commit %
- Enter <ctrl+p> to enter file search mode
- Refresh cache with
- search parent directories with <..>
- Press to run flake8 on the currently open file
- - go to next error
- Press while typing a keyword, built-in, standard library, or third-party modules
- Requires the language-specific syntax checker also be installed (e.g. vim-flake8 for python checking)
- Put cursor on line with a syntax error to see the error message
- This is a complicated plugin. Read through :help syntastic
python-mode/python-mode - Static analysis, syntax highlighting, refactoring, folding, completion, documentation, and more: all you need to develop python applications in Vim.
- No need to install pylint, rope or any other Python Libraries on your system with this plugin
- Vim motion for python objects (C means class, M means method or function):
[[
- Jump to previous class or function (normal, visual, operator modes)[[
- Jump to next class or function (normal, visual, operator modes)[M
- Jump to previous class or method]M
- Jump to next class or methodaC
- Select a class. (Ex: vaC, daC, yaC, ciC)iC
- Select inner class. (Ex: viC, diC, yiC, ciC)aM
- Select a function or method. (Ex: vaM, daM, yaM, caM)iM
- Select inner function or method. (Ex: viM, diM, yiM, ciM)
- (TODO: there are commands and shortcuts for jumping to definitions/declarations and quick refactoring. Read documentation and make shortcuts for these eventually)
spacebar
to fold code based on indentszR
- Unfold all foldszM
- Fold all foldszc
- close a foldzo
- open a fold
Lokaltog/powerline - Status bar that displays things like the current virtualenv, git branch, files being edited, and much more.
- Run from outside of vim with
yapf -i <filename.py>
<F8>
- Open tagbar
^a c
- create a new shell^a [0-9]
- go to window [0-9]^a S [optional file path to open]
- Make new screen window split horizontally^a V (or |) [optional file path to open]
- Make new screen window split vertically^a^l
- redraw window (good for fixing bugs?)^a X
- remove current screen window^a k
- kill the current shell^a d
- Detach, leave everything as is, but return to terminal^a D D
- Detach and logout (quick exit)screen -r
- Return to detached screen windowscreen -dRR
- Attach non screen state to current screen session- (screen is a large and useful application with a lot more commands. read up on to how to use it)
This is a PowershellScript that fully removes unwanted programs. Before running, ensure:
- Powershell is run in administrator mode
- Powershell is allowed to run unsigned scripts. Set with
Set-ExecutionPolicy RemoteSigned
To run,
- Navigate to the directory where the script lives
- Execute the script with
.\remove_bloatware.ps1 (enter)