Skip to content

Switch current vim buffer between c++ header and cpp files

Notifications You must be signed in to change notification settings

jpedrick/swapit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Swapit

==========================

Switch current vim buffer between header and source files.

Installation

Add the following line to your Vundle config in ~/.vimrc:

Plugin 'jpedrick/swapit'

Usage

To map "Swapit()" to F4 key:

nnoremap <F4> :call Swapit()<CR>

Define possible file extensions headers swap to source, source swap to headers:

let g:swapit_header_extensions = 'hpp:h'
let g:swapit_source_extensions = 'cpp:cxx:C:c:cc'

setting hidden mode is recommended:

set hidden

Define timeout. If search operation takes too long, error out and return vim control back to user.

let g:swapit_timeout = 5

Define log level [off, error, warn, info, debug]. Each level includes more detailed info of plugin progress:(error for normal every day use.)

let g:swapit_log_level = 'error'

About

Switch current vim buffer between c++ header and cpp files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%