Showing posts with label character. Show all posts
Showing posts with label character. Show all posts
Thursday, November 5, 2009
Next and Previous Characters
Hitting "^" will take you to the first non-blank character on the current line. Hitting the Enter key will take you to the first non-blank character on the next line. Hitting "-" will take you to the first non-blank character on the previous line. All these should be executed from normal mode.
Wednesday, April 30, 2008
Character Above, Below
If you're in insert mode, and you want to insert the character above the cursor, hit ctrl-y. To insert a character below the cursor, hit ctrl-e. Alternatively, if you want to grab entire words above and below, you can use the following mappings (which use text objects).
inoremap <C-Y> <Esc>klyiWjpa
inoremap <C-E> <Esc>jlyiWkPa
inoremap <C-Y> <Esc>klyiWjpa
inoremap <C-E> <Esc>jlyiWkPa
Thursday, December 6, 2007
Value Under Cursor
Sometimes I run into funky characters in files I'm editing. Sometimes I want to know what they are. Vim makes this easy. Put your cursor on the character you want to examine and type ga in normal mode. You can also use the ex command :ascii if you prefer.
Subscribe to:
Posts (Atom)