I have the following settings file:
# ~/.vimrc
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
set autoindent
How would I make these settings apply to python only? Also, how would I add python coloring (such as textmate does for each language) ?
Using Vim as a Python IDEThe python-mode project is a Vim plugin with syntax highlighting, breakpoints, PEP8 linting, code completion and many other features you'd expect from an integrated development environment.
To enjoy VIM emulation inside PyCharm, download and install PyCharm, go to File | Settings | Plugins and search for IdeaVim. Install it, restart the IDE and that's it! Give it a try, and while you're at it feel free to vote for new features and report any issues in YouTrack. Develop with pleasure!
Write Your Python Script To write in the vim editor, press i to switch to insert mode. Write the best python script in the world. Press esc to leave the editing mode. Write the command :wq to save and quite the vim editor ( w for write and q for quit ).
Run :ve[rsion] in command-line mode or run vim --version from Bash. If vim was compiled with Python 3, you'll find -python and +python3 . If vim was compiled with Python 2, you'll find +python and -python3 . If vim was compiled without Python support, you'll find -python and -python3 1.
I have these lines in my config:
filetype plugin indent on
syntax on
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 expandtab smarttab autoindent
This may be what you're looking for with the coloring: Improved Python syntax, Blackboard color scheme
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With