Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
systemverwaltung:user_info:vim [2016/03/16 09:03] admin [Pasting indented text] |
systemverwaltung:user_info:vim [2021/12/02 11:27] (aktuell) |
||
---|---|---|---|
Zeile 3: | Zeile 3: | ||
" | " | ||
- | Here are some tips: | + | Here are some tips from https:// |
* | * | ||
Zeile 56: | Zeile 56: | ||
To select a block between ( and ) do: | To select a block between ( and ) do: | ||
- | vab | + | vab |
and to select a block between { and } do: | and to select a block between { and } do: | ||
- | vaB | + | vaB |
===== Showing all your bookmarks ===== | ===== Showing all your bookmarks ===== | ||
Zeile 69: | Zeile 69: | ||
You can easy set bookmarks in your text with the command: m< | You can easy set bookmarks in your text with the command: m< | ||
- | ma | + | ma |
This sets the mark " | This sets the mark " | ||
From anywhere in your file you can jump to this mark with single-quote-< | From anywhere in your file you can jump to this mark with single-quote-< | ||
- | 'a | + | 'a |
Doing stuff until the next mark | Doing stuff until the next mark | ||
Zeile 80: | Zeile 80: | ||
Marks are not only great to find stuff in your file, you can also use them as a boundary when doing stuff over multiple lines. Example: | Marks are not only great to find stuff in your file, you can also use them as a boundary when doing stuff over multiple lines. Example: | ||
- | .,' | + | .,' |
This stands for: | This stands for: | ||
Zeile 94: | Zeile 94: | ||
Say you mark the beginning of the area with a and the end with b. Now we can do stuff like: | Say you mark the beginning of the area with a and the end with b. Now we can do stuff like: | ||
- | | + | delete area |
:' | :' | ||
- | | + | write area to a new file |
:' | :' | ||
- | | + | substitute only in this area |
:' | :' | ||
Zeile 113: | Zeile 113: | ||
You can ask vim to show a list of all your marks (and some marks it made on its own) with the command: | You can ask vim to show a list of all your marks (and some marks it made on its own) with the command: | ||
- | :marks | + | :marks |
If you are only intested in what is under mark f, you can ask vim also: | If you are only intested in what is under mark f, you can ask vim also: | ||
- | :marks f | + | :marks f |
===== Sort an part of your file in vim ===== | ===== Sort an part of your file in vim ===== | ||
Zeile 130: | Zeile 130: | ||
Hit | Hit | ||
- | :sort | + | :sort |
Et voila: the area is sorted alphabetical (well, ASCII-betical). | Et voila: the area is sorted alphabetical (well, ASCII-betical). | ||
Zeile 144: | Zeile 144: | ||
Open a filebrowser with | Open a filebrowser with | ||
- | :E | + | |
===== Edit your last shell command ===== | ===== Edit your last shell command ===== | ||
Zeile 151: | Zeile 151: | ||
In your bash-shell, hit | In your bash-shell, hit | ||
- | fc | + | |
Zeile 161: | Zeile 161: | ||
Some information of your current buffer is shown when entering the command | Some information of your current buffer is shown when entering the command | ||
- | g Ctrl-g | + | |
This includes the word-count | This includes the word-count | ||
Zeile 169: | Zeile 169: | ||
When editing a file named foo.c this mapping will open a new window with file foo.h: | When editing a file named foo.c this mapping will open a new window with file foo.h: | ||
- | map <C-h> :new %:p:r.h | + | |
- | Put this line in your .vimrc. Then, open a file foo.c and hit Ctrl-h. | + | Put this line in your '' |
(more to follow) | (more to follow) | ||
Zeile 179: | Zeile 179: | ||
Vim 101: A Beginner' | Vim 101: A Beginner' | ||
+ | |||
Vim 201: An Intermediate Guide to Vim http:// | Vim 201: An Intermediate Guide to Vim http:// | ||
Last updated: $Date: 2010-01-29 10:55:32 | Last updated: $Date: 2010-01-29 10:55:32 | ||
- | From: https:// | + | ===== vim und LaTeX ===== |
+ | |||
+ | LaTeX |