sábado, 6 de septiembre de 2014

vsvim


Entendible
http://bencrowder.net/files/vim-fu/

*******************
http://visualstudiomagazine.com/articles/2012/04/09/write-faster-code-by-adding-vim-to-visual-studio.aspx


Simpler Searching
Everything flows from these conventions. VsVim also includes part of VIM search capabilities. When in normal mode, type '/' followed by what you're looking for and press Enter.
A simple example of relocating a method:
  • Start with your cursor at or before the current method
  • Press 'v' to enter visual mode (used for selected ranges of text)
  • Press '}' to move past this block of text (end of the method)
  • Press 'd' to delete (cut)
  • Press '{' twice to move up two methods
  • Press 'p' to paste the method
To start learning VsVim (and VIM), don't start with empty documents. Print off a cheat sheet with commands and read a couple of articles on VIM. Then start programming with VIM. If you don't know how to do something, look it up, execute the command, and try to use it again.
***********

http://en.kioskea.net/faq/982-vi-vim-finding-a-word

[VI/VIM] Finding a word

To find a word in VI / Vim, just type "/" or "?", followed by the word you're searching for. 

Pressing the n key, will allow you to go directly to the next occurrence of the word. 

Another feature is to launch a search on the word where the cursor is positioned. Place the cursor over the word to search for, then press * or # to to look it up.

**************
http://nickmeldrum.com/blog/vsvim-plugin-for-visual-studio
http://www.viemu.com/vi-vim-cheat-sheet.gif
**************

Could I live without it? Easily.
Is it useful? Yes.

Reasons for Learning

  • vi is guaranteed to exist on all Unix systems and exists on most Linux ones as well. That kind of broad coverage makes learning it worth it.
  • It's much quicker to use vi for a sudo edit:
    $ sudo vi
  • Also, GMail uses vi-ish commands for selecting & moving emails around!
You don't have to be a master.
Just learn

The basics:

  • How to switch from command mode to insert mode i
  • How to switch from insert mode to command mode Esc
  • How to navigate up a line in command mode k
  • How to navigate down a line in command mode j
  • How to navigate left a character in command mode h
  • How to navigate right a character l
  • How to save a file :wEnter (write)
  • How to exit without saving (in command mode) :q!Enter
  • How to Undo u
  • How to Redo Ctrl+r
  • You can combine writing and quitting (in command mode): :wqEnter
From there the rest will just make you faster.
--------------
9
This is how I learnt it. Start with the minimum and build a little on it each day. Take the time to learn a slightly better way of achieveing a task. See the "7 habits of highly text editing" for inspiration. –  Ben Mar 1 '09 at 12:42
20
[:][X][Enter] is the same as [:][W][Q][Enter] –  Vitalii Fedorenko May 6 '10 at 14:13
*****************

Comandos "vi" ("vim") de uso frecuente



ESCAbandonar el modo de inclusión de texto para volver
al modo de comandos; también se usa para cancelar
comandos. (Usarlo en caso de duda)
Cntl-FAvanzar una pagina hacia adelante
Cntl-BAvanzar una pagina hacia atrás
Cntl-LRefrescar la pantalla
GCursor al final del fichero
1GCursor al principio del fichero
$Cursor al final de la linea
0 (cero)Cursor al principio de la linea
.
aAñadir texto a continuacion del cursor [TEXTO]
iInsertar texto en la posicion del cursor [TEXTO]
AAñadir texto al final de la linea [TEXTO]
IInsertar texto al principio de la linea [TEXTO]
oAñadir una linea debajo de la del cursor [TEXTO]
OAñadir una linea encima de la del cursor [TEXTO]
uDeshacer el último cambio realizado
:redRehace los cambios deshechos con ''u'' o '':u''
xBorrar un caracter (y ponerlo automaticamente en el ALMACEN)
DBorrar el resto de la linea (a la derecha del cursor)
dwBorrar una palabra (hasta el primer blanco a la dcha. del cursor)
ddBorrar la linea entera
8xBorrar 8 caracteres
2dwBorrar 2 palabras
7ddBorrar 7 lineas
pPoner el contenido del ALMACEN temporal a continuacion del cursor
PPoner el contenido del ALMACEN temporal antes del cursor
sSubstituir un caracter por texto [TEXTO]
15sSubstituir 15 caracteres por texto [TEXTO]
rSubstituir un solo caracter por otro nuevo, sin entar
en modo de TEXTO
RSobreescribir [TEXTO]
JUnir la linea del cursor y la siguiente
i[ENTER]Romper una linea en dos
.Repetir el último cambio realizado
yyPoner la linea presente en el almacen temporal
5yyPoner cinco lineas en el almacen
:wGuardar en el fichero que se esta editando los cambios realizados
(Aconsejable ejecuarlo de vez en cuando)
:w!Idem, forzandolo si fuese necesario.
:w FicheroGuardar en el fichero "Fichero"
:wqGuardar y salir de "vi".
:wq!Idem, forzandolo si fuese necesario.
NOTA: Cada vez que se borra texto, el texto borrado pasa a un ALMACEN temporal, de donde elimina lo que estuviese almacenado previamente.

No hay comentarios:

Publicar un comentario