Hola a tod@s, a veces cuando intento escribir o modificar un Archivo con el Editor de Texto Vim no me aclaro y en alguna ocasión he estado a punto de "liarla" con Archivos de Configuración del Sistema como por ejemplo: /etc/apt/sources.lits , en el cual se encuentran los Repositorio de Aplicaciones.
Por esta razón empezare un "Mini Manual" en el que Explicare un uso Básico de Vim. Si te preguntas ¿Para I want to use Vi, Gedit taking processors as or Abiword? , as for example, if you followed the guide Configuring a Server "Blind" you come from "Perilla" know how to use a word processor such as Vim.
The advantage of Vim to other word processors is that they run from the console, so we can dispense with the Graphical Environment and therefore the use of a monitor, as the case of a Server "blind" which have no keyboard, mouse and Monitor. Well
to Use Vim in our Team only thing we can do for your installation, run the following command:
julian @ ubuntu: ~ $ sudo apt-get install vim
Reading package lists ... Done
Building dependency tree Reading
state information ... Done
Suggested packages: ctags
vim-doc vim-scripts
will be installed following NEW packages vim
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B/845kB of files.
1692kB will be used for additional disk space after unpacking.
Selecting previously deselected package vim.
(Reading database ...
155411 files and directories currently installed.)
Unpacking vim (from .../vim_1% 3a7.1.314-3ubuntu3_i386.deb) ...
Configuring vim (1:7.1.314-3ubuntu3) ...
and is already installed, now begin to use Vim:
first thing we should do is take a look at Vim Tutor, which teaches us Use with explanations and examples. To enter the Guardian click on the console I saw the following command:
julian @ ubuntu: ~ $ vimtutor
==================== ================================================== =========
= B ienvenidoaltutorde VIM - Version 1.4 =========================== =
================================================== ==
Vim is a very powerful editor that has many commands, too
to be explained in a tutor such as this. This tutorial is designed to describe
enough mandates for you to be able to
easily learn to use Vim as a general-purpose editor.
The time required to complete the tutor is approximately
25-30 minutes, depending on how much time is devoted to experimentation.
The mandates of these lessons will change the text. Make a copy of this file
to practice (to "vimtutor" this is already a copy).
is important to remember that this tutorial is designed to teach
practice. This means that it is necessary to implement the mandates
to learn them properly. If you only read the text, forget
mandates.
Now, make sure the caps lock key is not enabled
and press the j key enough to move the cursor
so that Lesson 1.1 completely fill the screen.
"/ tmp/tutorQv8124" [Become] 769 lines, 28041 characters
After reviewing the Tutor to create a file, run the command: vim filename
and see the following in the Console: julian @
ubuntu: ~ $ vi PruebaVi
~ ~ ~
~ ~
"PruebaVi" [New File] 0.0 to 1 All
Now a clarification, Vi has two modes, Normal Mode and insert mode.
in insert mode, as its name suggests, we can insert text into our archive or document and pass on to insert mode by pressing the Send "I" once created the file.
And to switch to Normal mode will press the key "Esc" and we can not insert text. But if we can move all the files in case you need to change a word.
has to start Insert Text pressing the letter "i" (insert mode) if we want to start inserting text at the cursor position. We will see that we can start that has write at the end of the console see:
- INSERT -
But if we insert text in the next blank space after the cursor, press the letter "a ". Examples:
Press "I"
to test (the first letter is inserted in the "A" Test).
Press "A"
to Test (the first letter is inserted with a space before the "A" test).
Vim To Exit Saving Changes made to a file, press the following keys: Shift +
"w". (uppercase, two points w)
Vi To Exit Saving Changes and Closing the document, press: Shift +
": wq" (capitalized and a colon wq)
can "save " the two previous orders by clicking the following combination of keys, which guardará el Documento y saldremos de Vim:
Shift + ":x" (mayúscula, dos puntos y x)
Para Salir de Vim Sin guardar los Cambios Pulsaremos la Secuencia de Teclas:
Shift + "q" (mayúscula, dos puntos y q)
Si nos equivocamos en algo, podemos deshacer los cambios mediante la combinación:
Shift + "u" (mayúscula, dos puntos y u)
Si aparte del Tutor necesitas Ayuda con Vim, escribiremos en la Consola y en Modo Normal ( pulsamos primero la Tecla Esc) lo Siguiente:
~
~
~
~
:help
*help.txt* For Vim version 7.1. Last change: 2006 Nov 07
VIM - main help file
k
Move around: Use the cursor keys, or "h" to go left, h l
"j" to go down, "k" to go up, "l" to go right. j
Close this window: Use ":q
Get out of Vim: Use ": qa!
Jump to a subject: Position the cursor on a tag (eg know how to use Vim Processor, especially in these times that we ran graphical environment to see added a line in the server configuration file Figure / etc/X11/xorg.conf
. And also as we have said many times, never know too much.
A GREETING.
PUDI.
0 comments:
Post a Comment