User Tools

Site Tools


tools:vim

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
tools:vim [2015/02/26 13:00] – created oschuetttools:vim [2015/09/01 08:22] – [Plugin setup] tmueller
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://manual.cp2k.org/trunk/cp2k.vim | cp2k.vim]]. Download the file cp2k.vim and copy it to the folder ~/.vim/syntax in your home directory, e.g. using+Syntax highlighting for CP2K input files can be enabled with the (g)vim editor using the vim plugin file [[http://manual.cp2k.org/trunk/cp2k.vim | cp2k.vim]]. 
 +Download the file ''cp2k.vim'' and copy it to the folder ~/.vim/syntax in your home directory, e.g. using
  
-<code> +<code bash>
-wget http://manual.cp2k.org/trunk/cp2k.vim+
 mkdir -p ~/.vim/syntax mkdir -p ~/.vim/syntax
-mv cp2k.vim ~/.vim/syntax+wget -O ~/.vim/syntax/cp2k.vim http://manual.cp2k.org/trunk/cp2k.vim
 </code> </code>
  
-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 ''filetype.vim'' in the ''~/.vim'' folder containing the following lines
  
-<code>+<code vim>
 if exists("did_load_filetypes") if exists("did_load_filetypes")
    finish    finish
Line 25: Line 25:
 which causes that all files with the name extension ".inp" will be considered as CP2K input files by the Vim editor. You may change the extension due to your favored settings. which causes that all files with the name extension ".inp" will be considered as CP2K input files by the Vim editor. You may change the extension due to your favored settings.
  
 +=== Alternative for pathogen.vim users ===
 +
 +For developers using pathogen or similar VIM runtime path managers, a [[https://github.com/cp2k/vim-cp2k|separate vim-cp2k repository]] is provided and the setup procedure is even easier:
 +
 +<code bash>
 +git clone https://github.com/cp2k/vim-cp2k.git ~/.vim/bundle/vim-cp2k
 +</code>
 ==== Usage Tips ==== ==== Usage Tips ====
 === Syntax folding === === Syntax folding ===
tools/vim.txt · Last modified: 2023/11/10 15:31 by krack