Skip to content
cutils is a repository of small functions I've found useful when using vim.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status

cutils is a repository of small functions I've found useful when using vim. This plugin was created to clean my vimrc file (which at the time was getting huge > 1200 LOC!). Feel free to use it, suggest new functions or improve current ones.

NOTE: Not all functions are mine. you'll find the url/author from where I fetch the original versions at the documentation.


  • Vim 7.0+


  • Vundle way (recommended), add the following to your $HOME/.vimrc file:

      Bundle 'javier-lopez/cutils.vim'

    And run inside of vim:

  • Pathogen way:

      $ git clone ~/.vim/bundle/cutils.vim
  • Manual (simplest if you've never heard of vundle or pathogen), download the zip file generated from github and extract it to $HOME/.vim

      mv cutils.vim*.zip $HOME/.vim
      cd $HOME/.vim && unzip cutils*.zip

    Update the help tags from vim:

      :helpt ~/.vim/doc/


cutils define at least the following functions:

  • CULongLines (show long lines)

     :CULongLines [#_characters]
     let g:cutils_map_longlines = '<Leader>cul'

  • CUVCSInfo (show branch information, support: git, svn)

     :echo CUVCSInfo()
     :set statusline+=%{CUVCSInfo()}

  • CUFileSize (show current file size in Kb or MB)

     :echo CUFileSize()
     set statusline+=%-7{CUFileSize()}

  • CUAppendModeLine (append modeline at the end of current file)

     let g:cutils_map_appendmodeline  = '<Leader>cua'

  • CUSkel (template system for empty files)

     let g:cutils_skel_dir  = './assets/skeletons'

  • CUSetProperties (apply preferences by lang)

     let g:cutils_setproperties_dir  = './assets/lang'
  • CUVisualSearch (enable [*|#] in visual mode)

     let g:cutils_visualsearch  = 1 "enabled by default
You can’t perform that action at this time.