Search This Blog

Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

Monday, February 06, 2012

cygwin mintty vim output is not to a terminal

Inside the cygwin terminal if you do

$ uname -r
1.7.10(0.259/5/3)

$ mintty.exe

The mintty terminal pops up. However, if you run vim in the mintty terminal, there are warnings such as

$ vim junk1.txt
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

To get rid of these warnings, start mintty with "mintty.exe -". The .exe is optional. It is the '-' that is more important.

Why bother with the mintty terminal in the first place? Because it has a lot more functionality than the default cygwin terminal. For eg., the mintty terminal can be resized, maximized, minimized in both the directions; copy pasting text from/to the terminal is a breeze.

Monday, March 26, 2007

search for one word and exclude another word in vim

In vim, to find all the lines containing the word 'condition' (without the quotes) and to exclude those lines containing 'condition number', install the LogiPat plugin available at http://vim.sourceforge.net/scripts/script.php?script_id=1290

The sample command looks like

:LP "condition" & !"condition_number"

Related links
  • Download and installation instructions http://vim.sourceforge.net/scripts/script.php?script_id=1290
  • LogiPat on Author's homepage http://mysite.verizon.net/astronaut/vim/index.html#LOGIPAT
  • Discussion on vim mailing list http://tech.groups.yahoo.com/group/vim/message/78897

Wednesday, January 25, 2006

format the whole file with vim

Vim is a powerful text editor. Debian users can install vim using the command

apt-get install vim

To format the whole file using vim, use the command gg=G in the normal mode.

Followers