Category Archives: vim

Improving PHP autocompletion in VIM

After watching VIM as PHP IDE I revisited my config, specifically pimped ctags according to articles Vim Autocompletion for PHP and Exuberant ctags with PHP in Vim So my current $HOME/.ctags is: –recurse –languages=php –langmap=php:.inc.php –fields=+aimS –PHP-kinds=+cfd –exclude=.svn –exclude=.git –exclude=cache –exclude=tags –exclude=min … Continue reading

Posted in Uncategorized, vim | Tagged , , | Leave a comment

Faster CtrlP fuzzy search with custom ignore

Had some issues with listing files from modules/ via CtrlP so I ended up writing my own user command for. let g:ctrlp_user_command = ‘find %s -type f -not \( -path “*/.svn/*” -o -path “*/.git/*” -o -path “*/vendor/*” -o -path “*/.idea/*” -o … Continue reading

Posted in vim | Tagged , | Leave a comment

Reuse command or search from history in VIM

I just came across http://vim.wikia.com/wiki/Using_command-line_history from a tweet. In Normal mode press q: and the command (:) history will appear. Movement with j or k moves up and down and hitting Enter reexecutes the command where the cursor stands. The same … Continue reading

Posted in vim | Tagged | Leave a comment

Improving VIM skills

I decided to study VIM more to master it better. I just started watching https://www.youtube.com/watch?v=SkdrYWhh-8s and Ben made a great point already in the first 6mins. Map saving to Ctrl+s # ~/.vimrc nnoremap <c-s> :w<CR> inoremap <c-s> <Esc>:w<CR> vnoremap <c-s> … Continue reading

Posted in vim | Tagged , , , | Leave a comment

Unneeded whitespace visual notification in VIM

Just read http://antjanus.com/blog/thoughts-and-opinions/use-vim/ and found the following lines in his .vimrc at https://github.com/AntJanus/dotfiles/blob/master/.vimrc#L200 ” Whitespace fixes highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ autocmd InsertLeave * match ExtraWhitespace /\s\+$/ autocmd … Continue reading

Posted in vim | Tagged | Leave a comment

CSS syntax errors via CSSlint in VIM

In action You gonna need nodejs and then install CSSlint: sudo npm install -g csslint CSSlint options: $ csslint Usage: csslint-rhino.js [options]* [file|dir]* Global Options –help Displays this information. –format= Indicate which format to use for output. –list-rules Outputs all … Continue reading

Posted in cli, css, vim | Tagged , | Leave a comment

Finally awesome function and path completion for VIM

Many thanks to the neocomplete.vim developer

Posted in vim | Tagged , | Leave a comment