vim and end-of-line on the last line
VIM (the best editor on earth. ahem!) believes that lines in a text file should always end with a end of line character, and last line is no exception.
But, sometimes during coding JSPs I have encountered problems with end of lines in the last lines. <jsp:include file=""/> constructs in jsps add undesired line breaks in your including jsps. After trying to work around it for a long time now, I decided to see what option is it in vim that can skip the end-of-line character on the last line (Vim has got to have an option for everything, definitely not the kind of ctrl-alt-shift-and-stretch-your-finger-to-key-you-cannot-reach-emacs-option - ahem!)
Now, to the point, the basic idea is to set the specific file as 'binary' and ask vim not to include eol
:set binary
:set noeol
as simple as that. Now, there won't be any new lines at end of files. These settings are local to the buffer and won't affect your other files in the same window.
Say you want to set those options permanently for that file, you can automatically direct vim to set those options for the buffer by adding them in the comment.
In case of jsp, the following line either at the beginning or the end of file will do:
<!-- vim: noeol binary --%><%
// rest of your code goes here
%>
Thanks for flying Vim!



