Courser highlighting and code formating in Vim

Every Programmer knows some of these very annoying situations:

So, to boils it down to one Point: You have trouble to because of bad code formating…

Today, I’ve found a solution, with unburden you from this problem a little bit: Vim helps you!

"Courser Highlighting
 
hi CursorLine term=bold cterm=bold guibg=Grey40 ctermbg=darkgrey
hi CursorColumn cterm=none guibg=Grey40 ctermbg=darkgrey
nnoremap <Leader>c :set cursorline! cursorcolumn!<CR> 

Adding these to your .vimrc you can toggle with \c (when ** is your Leader-Key (by default)) a line and column highlighting. In these case in darkgrey.

So you can very easy see wrong indenting or can read long lines a little bit comfortably.

And, you can persuade vim to format the code for you:

= n
" where n is the number of following lines, which should be formatted 
" (e.g =7, for the next 7 lines)

" or 

=i{

"to format the next code block 

Try it and make your life easier!

You have another opinion?
Great! Then let's reduce the fallacy together!


Why are there no comments?