Tuesday, November 23, 2010

Msx Roms Metal Gear Englsh

VIM III: Vim hints

In the previous entry enter some basic commands for using VIM, today will expand the number of commands that can be used in this text editor.
  • dd: Delete the line in which the cursor is located.
  • r: Replace the character on which the cursor is positioned.
  • ~: Replace the character on which the cursor is positioned by a capital letter if the character was lower case or lower case if the character was capitalized.
  • u: Undo the last change made to the document.
  • [ctrl] + r: Redo the last change waste.
  • Y: Copy the contents of the line in which the cursor.
  • p: Paste the last cut or copied item, ie you can copy the last line deleted with "dd" or copied the last line with "Y". It is worth mentioning that this copy is in the position following the current cursor location.
  • G: Go to the top of the last line of the document.
  • 1G: Lets go to the top of the first line of the document.
  • w: Lets move from one floor to the start of the next word, ie, you can move from one floor to another. "W" has the same effect.
  • b: You can go back from a word at the beginning of the same word, that is, they can go back one word to another. "B" has the same effect.
  • m: Make a mark on the document at the beginning of the line where the cursor. Ma ie, that position is marked and the name of the brand is a.
  • ': Returns to the location of a brand created earlier. Eg 'a, is accessed that contains the brand position a.
This editor also allows searches on the document, for this you must use the "/" character.
  • / frase_buscada: Allows a search on the document.
  • n: Access to the next position where the word or phrase.
  • N: Access to the previous position where the word or phrase.
is important to mention that VIM also allows you to search with regular expressions.

As mentioned in previous post also can execute commands preceded by ":" then you add new commands.
  • :% s / frase_buscada / frase_nueva / g: You can substitute one phrase for another in the whole document. The "%" indicates that the search should be made throughout the document, the "s" indicates that the operation to be performed is substitution between the first and second "/" is entered the search phrase, between the second and the third "/" is entered new phrase and the "g" at the end of the line indicates that if the phrase is more than once in a line, it replaces all the times you are.
  • : 'a,' bs / frase_buscada / frase_nueva / g: You can substitute one phrase for another in the document between two marks. The "'a,' b 'indicates that the search should be made between the" a "and" b "of the document, the" s "indicates that the operation to be performed is substitution between the first and second" / "Entering the phrase to search, between the second and third" / "new phrase is entered and the" g "at the end of the line indicates that if the phrase is more than once in a line, is replaced All times are.
  • : 'a,' bd: Clears all lines located between the "a" and "b". The marks "'a,' b 'indicates that the lines will be eliminated should be between the" a "and" b ", the letter" d "indicates that the operation to be performed is to remove the lines.
  • : set nosmartindent: Removes autoindexación in the document.
  • : set smartindent: Add the autoindexación in the document.

"Thank you for sharing your knowledge"

0 comments:

Post a Comment