linux:vim:comandos

Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

Ambdós costats versió prèvia Revisió prèvia
Següent revisió
Revisió prèvia
linux:vim:comandos [13/08/2018 03:00] – [Plugins/extensiones/personalización] matelinux:vim:comandos [07/11/2020 14:25] (actual) – [Basics] admin
Línia 2: Línia 2:
 ~~NOTOC~~ ~~NOTOC~~
 {{tag>linux}} {{tag>linux}}
-/vía: [[https://www.catswhocode.com/blog/vim-cheat-sheet-for-2016]]+/vía: [[https://www.catswhocode.com/blog/vim-cheat-sheet-for-2016]]\\
 <del>/vía:[[http://www.catswhocode.com/blog/130-essential-vim-commands]]</del> <del>/vía:[[http://www.catswhocode.com/blog/130-essential-vim-commands]]</del>
  
 == info == info
   * [[linux:vim:vimrc]]   * [[linux:vim:vimrc]]
 +  * [[linux:vim:mlechon1aldia]]
  
  
 ==Plugins/extensiones/personalización ==Plugins/extensiones/personalización
 <callout type="warning" title="Pendiente: modificación status line" icon="true">https://kadekillary.work/post/statusline/</callout> <callout type="warning" title="Pendiente: modificación status line" icon="true">https://kadekillary.work/post/statusline/</callout>
-[<callout type="warning" title="Pendiente: modificación status line" icon="true">[https://gist.github.com/millermedeiros/1262085]]</callout>+<callout type="warning" title="Pendiente: modificación status line" icon="true">[[https://gist.github.com/millermedeiros/1262085]]</callout>
  
   * gestión/instalación plugins en sus propios directorios (runtimepath): [[https://github.com/tpope/vim-pathogen]]   * gestión/instalación plugins en sus propios directorios (runtimepath): [[https://github.com/tpope/vim-pathogen]]
Línia 25: Línia 26:
 </code> </code>
  
-==Basics+== Basics 
 +  * **[N] acción moción** 
 +  * acciones: 
 +    * d - delete 
 +    * c - caracter sustitución 
 +    * >,< - indentación, desindentación 
 +    * gU,u - uppercase 
 +    * y - copiar 
 +  * moción 
 +    * w - palabra 
 +    * e - final de palabra 
 +    * b - palabra anterior 
 +    * ^ - principio de línea 
 +    * $ - final de linea 
 +    * gg - principio documento 
 +    * G - final de documento 
 +    * iw - inside word 
 +    * aw - arorund word 
 +  * . - repite última edición 
 + 
 +== more Basics
   * '':e'' filename : Open filename for edition   * '':e'' filename : Open filename for edition
   * '':w'' : Save file   * '':w'' : Save file
   * '':q'' : Exit Vim   * '':q'' : Exit Vim
   * '':q!'' : Quit without saving   * '':q!'' : Quit without saving
-  * '':x'' : Write file (if changes has been made) and exit+  * ''%%:x%%'' : Write file (if changes has been made) and exit
   * '':sav'' filename : Saves file as filename   * '':sav'' filename : Saves file as filename
   * ''.'' : Repeats the last change made in normal mode   * ''.'' : Repeats the last change made in normal mode
Línia 40: Línia 61:
   * ''gg'' : move the cursor to the begining of the file   * ''gg'' : move the cursor to the begining of the file
   * '':59'' : move cursor to line 59. Replace 59 by the desired line number.   * '':59'' : move cursor to line 59. Replace 59 by the desired line number.
- 
   * ''k or Up Arrow'' : move the cursor up one line   * ''k or Up Arrow'' : move the cursor up one line
   * ''j or Down Arrow'' : move the cursor down one line   * ''j or Down Arrow'' : move the cursor down one line
Línia 110: Línia 130:
     * '':%s/^\(.*\)\n\1$/\1/'' : Delete lines which appears twice     * '':%s/^\(.*\)\n\1$/\1/'' : Delete lines which appears twice
     * '':g/string/d'' : Delete all lines containing string     * '':g/string/d'' : Delete all lines containing string
 +      * ''g/^$/d'' : borra líneas en blanco -> ''v/./d''
 +      * ''g/^\s*$/d'' : borra líneas en blanco o con espacios/tabuladores
 +      * más ejemplos: [[https://vim.fandom.com/wiki/Power_of_g]]
     * '':v/string/d'' : Delete all lines containing which didn’t contain string     * '':v/string/d'' : Delete all lines containing which didn’t contain string
  
Línia 116: Línia 139:
   * ''Ctrl+x'' : Decrement number under cursor   * ''Ctrl+x'' : Decrement number under cursor
   * ''ggVGg?'' : Change text to Rot13   * ''ggVGg?'' : Change text to Rot13
 +
  
 ==Case ==Case
Línia 140: Línia 164:
   * '':e .'' : Open integrated file explorer   * '':e .'' : Open integrated file explorer
   * '':Sex'' : Split window and open integrated file explorer   * '':Sex'' : Split window and open integrated file explorer
-  * '':Sex!'' : Same as +  * '':Sex!'' : Same as ''Sex'' but split window vertically
-  * '':Sex'' but split window vertically+
   * '':browse e'' : Graphical file explorer   * '':browse e'' : Graphical file explorer
   * '':ls'' : List buffers   * '':ls'' : List buffers
Línia 238: Línia 261:
  
 == cifrado == cifrado
-  * '':X'' : pregunta por contraseña para cifrar el fichero a la hora de guardar+  * ''%%:X%%'' : pregunta por contraseña para cifrar el fichero a la hora de guardar
   * '':setlocal cm?'' : show encryption method for the current file (cm abreviación de cryptmethod   * '':setlocal cm?'' : show encryption method for the current file (cm abreviación de cryptmethod
   * '':setlocal cm=zip'' : weak (default for backwards-compatibility)   * '':setlocal cm=zip'' : weak (default for backwards-compatibility)
  • linux/vim/comandos.1534154410.txt.gz
  • Darrera modificació: 13/08/2018 03:00
  • per mate