:v/pattern/command
http://vim.wikia.com/wiki/Search_for_lines_not_containing_pattern
I needed to see how many tabs there were in a tab delimited file because it was failing column-length validation, even though it look on excel as if it had the right number of columns. I couldn't see the tabs on vim. What was the solution?
:set list
To turn it off, just close your editor window and open it again.
Just kidding, to turn it off:
:set nolist
http://groups.google.com/group/comp.editors/browse_thread/thread/5004925...
So my nice little bash script wasn't woking on cygwin. What could be wrong? I was getting a weird error saying that my file was not ending correctly.
What was the problem?
Answer: working on Windows.
No, it is not what it sounds! No OS zealotry here! The problem was that my beloved Vim adapts to its environs very well, so it was adding a CrLF at the end of my script file. Cygwin couldn't deal with that, ergo the error. http://stackoverflow.com/questions/630650/errors-on-beginner-bash-script
The solution on vim is easy:
:set fileformat=unix
:w
I found the solution here:
I just finished massaging the text of a book to create a random quote generator.
I started by getting a copy of the book in pdf. From here, I saved a copy to as text. I left it while it was doing its thing since it was taking its sweet time. I expected a monster of a text. However, the text was only about 500K.
I quickly deleted some of the page footer and page header text. Then the fun started.
The sentences were broken at what appeared to be random points. A sentence would start at one line and continue for a few lines on.
Okay, here is a little handy regex that I found/created to gather full sentences that are broken over several lines.
/^[A-Z]\_.*?\./
Which translates into:
^ Start the the beginning of a line
[A-Z] Match a capital letter
\_. Match everything including new lines. I got this tip from the link below. Thanks!
* No match or more
? Non greedy! Otherwise the match keeps going until the last line
\. Match the period.
Simple, isn't? :P
http://www.bright-green.com/blog/2004_08_19/multiline_vim_regexps.html
I guess the point where you become a vi guy is when you are typing entries on web interfaces, and you miss your vi commands to navigate and edit. It seems that Eric Uhrhane felt the same way, so he wrote jV, a great firefox plugin that will turn texareas in html forms into mini vim editors
The goods:
To record: To record "keyo' do your macroee stuff here" q
To use: @"key"
The blah, blah, blah:
Okay, so I am ready to create a new macro on vim, and then I realized that I forgot how to make one. :(
I found this entry on how to do it. The best part about it is that the author forgot to talk about how you turn off the recording, so then the possibility of recursively calling the macro while you are recording was brought up. Nothing makes you smile like a random encounter with recursion!