cat brain.log | less

Getting it down on `paper`

Trigger Pylint (or PHP Syntax Checking) in Vim with Hotkeys

first: install
sudo apt-get install pylint

second: update ~/.vimrc – add the following lines:

" Enable filetype detection for per-file plugin loading.
filetype on
filetype plugin on

third: for each filetype you wish to tweak, update its ftplugin/*.vim file.

Python:
cd /usr/share/vim/vim73/ftplugin/
sudo vi python.vim

Add the following lines:

"Trigger pylint on current file by pressing ';'
noremap ; :!pylint %<CR>

PHP:
sudo vi php.vim
Add the following lines:

"Trigger php syntax checking on current file by pressing ';'
noremap ; :!php -l %<CR>

Done.
Not that bad, right?

 

Comments

No comments so far.

(comments are closed)