Skip to content

Instantly share code, notes, and snippets.

@snambi
Created January 4, 2017 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snambi/8177df9139118558c1ebaf3b96abf4c7 to your computer and use it in GitHub Desktop.
Save snambi/8177df9139118558c1ebaf3b96abf4c7 to your computer and use it in GitHub Desktop.
How to setup VIM for editing python code
# open $HOME/.vimrc
vi ~/.vimrc
# Enable ftplugin ( File Type Plugin ) in $HOME/.vimrc
filetype plugin indent on
# save .vimrc file
# Create ftplugin folder
mkdir -p $HOME/.vim/ftplugin
# create python.vim file
vi ~/.vim/ftplugin/python.vim
# add following lines in python.vim file
set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4
# save python.vim file
# Now VIM is enabled for editing python code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment