Auto Python Indent Code In Vim With Yapf
Yapf is a great utility to autoindent Python Code.
Let us install yapf with pip.
pip install yapf
Once you have yapf installed.
Open your .vimrc file and add following mapping...
autocmd FileType python nnoremap <leader>y :0,$!yapf<Cr><C-o>
Exit out of vim and open your .py file using vim. Hit <leader>y, you would see your Python code indented nicely.
- Learn And Code Confusion Matrix With Python
- How To Code RNN and LSTM Neural Networks in Python
- How To Run Code From Git Repo In Collab GPU Notebook
- Regularization Techniques in Linear Regression With Python
- Merge and Join DataFrames with Pandas in Python
- Decision Tree Regression With Hyper Parameter Tuning In Python
- Data Cleaning With Python Pdpipe
- Understanding Standard Deviation With Python
- How To Install Python With Conda