tools:vim
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
tools:vim [2015/02/26 13:00] – created oschuett | tools:vim [2020/08/21 10:15] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
==== Plugin setup ==== | ==== Plugin setup ==== | ||
- | Syntax highlighting for CP2K input files can be enabled with the (g)vim editor using the vim plugin file [[http:// | + | Syntax highlighting for CP2K input files can be enabled with the (g)vim editor using the vim plugin file [[http:// |
+ | Download the file '' | ||
- | < | + | < |
- | wget http:// | + | |
mkdir -p ~/ | mkdir -p ~/ | ||
- | mv cp2k.vim | + | wget -O ~/ |
</ | </ | ||
- | In addition create a file with the name filetype.vim in the ~/.vim folder containing the following lines | + | In addition create a file with the name '' |
- | < | + | < |
if exists(" | if exists(" | ||
| | ||
Line 25: | Line 25: | ||
which causes that all files with the name extension " | which causes that all files with the name extension " | ||
+ | === Alternative for pathogen.vim/ | ||
+ | |||
+ | For developers using pathogen or similar VIM runtime path managers, a [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | git clone https:// | ||
+ | </ | ||
==== Usage Tips ==== | ==== Usage Tips ==== | ||
=== Syntax folding === | === Syntax folding === | ||
- | The syntax folding based on the CP2K input line indentation | + | The syntax folding based on the CP2K input line indentation |
+ | < | ||
+ | au FileType cp2k setlocal foldlevel=99 foldmethod=indent | ||
+ | </ | ||
+ | |||
+ | . The following Vim editor commands might be useful for large CP2K input files: | ||
* za :: Toggle the folding of the current fold level | * za :: Toggle the folding of the current fold level | ||
* zA :: Toggle the folding of all fold levels recursively | * zA :: Toggle the folding of all fold levels recursively | ||
Line 54: | Line 66: | ||
:set shiftwidth=0 tabstop=0 | :set shiftwidth=0 tabstop=0 | ||
</ | </ | ||
+ | The vim indent command " | ||
==== Vim support for the CP2K code development ==== | ==== Vim support for the CP2K code development ==== |
tools/vim.txt · Last modified: 2023/11/10 15:31 by krack