Skip to main content

Home/ VIM Editor/ Group items tagged Visual

Rss Feed Group items tagged

reckoner reckoner

Search and replace in a visual selection - Vim Tips Wiki - a Wikia wiki - 0 views

  • In visual mode, / and ? will update the visual selection just like any other cursor-movement command. In order to actually search within the visual selection, you will need to use the \%V atom, or use the markers defined by the visual selection with \%>'< and \%<'> atoms. This is best done by leaving the visual selection with <esc> before entering your search. You may want to consider a mapping to automatically leave visual selection and enter the appropriate atom(s). For example:
reckoner reckoner

Tip #63 - Applying substitutes to a visual block : vim online - 0 views

  • Applying substitutes to a visual block  tip karma   Rating 155/45, Viewed by 8082  Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip. created:   March 28, 2001 8:26      complexity:   intermediate author:   Chip Campbell      as of Vim:   5.7 If you'd like to apply a substitute, or even any ex command, to a visual-block selected text region (ctrl-v and move), then you'll want Stefan Roemer's http://www.erols.com/astronaut/vim/vimscript/vis.vim .  Just source it in, and then press ":B".  On the command line you'll see :'<,'>BCtrl-V Just continue with the substitute or whatever... :'<,'>B s/abc/ABC/g and the substitute will be applied to just that block of text
reckoner reckoner

minibufexpl.vim - Elegant buffer explorer - takes very little screen space : vim online - 0 views

  • description Several modern GUI editors list your open buffers as tabs along the top or bottom of your screen (VisualStudio, DreamWeaver, EditPlus and UltraEdit come to mind), now we have this feature in VIM! You can checkout a screenshot here: http://www.wavell.net/vim/vim_screenshot.gif. You can quickly switch buffers by double-clicking the appropriate "tab" (if you don't want to use the mouse just put the cursor on the "tab" and press enter). As you open and close buffers the tabs get updated. Buffers that are modified get visually marked and buffers that are open in a window get visually marked. The -MiniBufferExplorer- opens automatically when you open more than one eligible buffer (no need to open the explorer if you’re only editing one file.) -MiniBufExplorer- doesn't bother showing non-modifiable or hidden buffers. You can delete buffers by selecting them and pressing d on the keyboard.
reckoner reckoner

A Collection of Vim Tips | Ayman Hourieh's Blog - 0 views

  • to auto-indent a piece of code, highlight it in visual mode, and press =. To auto-indent the current line, press ==. Use gq to wrap the highlighted peice of text.
  • SuperTab: Makes all insert-mode completion done with tab. To use, simply press TAB while in edit mode. minibufexpl: Adds a buffer explorer to the top of Vim's window, simplifies working with buffers. taglist: A source code browser that works with many languages, including C/C++, Java, Python, Perl, PHP, ... vcscommand: SVN/CVS integration.
reckoner reckoner

Tip #21 - easy pasting to windows apps : vim online - 0 views

  • In Vim, the unnamed register is the " register, and the Windows Clipboard is the * register. This means that if you yank something, you have to yank it to the * register if you want to paste it into a Windows app. If this is too much trouble, set the 'clipboard' option to 'unnamed'. Then you always yank to *. So pasting to windows apps doesn't require prefixing "* :   set   clipboard=unnamed
  • You can also have the Visual selection automatically copied to the clipboard.  If you :set go+=a
reckoner reckoner

Search for visually selected text - Vim Tips Wiki - a Wikia wiki - 0 views

  • With the following, you can use g/ (or g?) to search forwards (or backwards) for the currently selected text.
reckoner reckoner

vim : Message: RE: repeating action between marks - 1 views

  • RE: repeating action between marks >Say for example I'd like to indent the text between lines 10-20. I'd >like to use marks points to indicate the lines through which to >repeat the last action I performed on a single line (in this case an >indentation), how would I do that? >I know I could for example do some regex like this: >:'a,'bs/^/ / >and clearly I can do this with a visual selection. >but how could I repeat the last action I performed over two marks: >:'a,'b<something goes here to indicate 'repeat last action'> '&' is a good start. Eg, if I use a 's///' command on one line just to see if it works as expected, I can repeat it through the entire file with :g//& :.,$& :15,20& etc., and it'll redo the 's///' command on the rest of the file or whatever limits you impose. If you do a non-'s///' command, eg, ":10,30>" to indent lines instead, you can look for patterns, etc., and do things like :/beginpattern/,/endpattern/> too. Not quite sure if that's what you were asking about, but if not, just yell back...
1 - 9 of 9
Showing 20 items per page