8000 GitHub - tdakhran/vim-swapfiles: vim plugin that help to navigate between source and header files. · GitHub
[go: up one dir, main page]

Skip to content

About

vim plugin that help to navigate between source and header files.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Introduction

vim-swapfiles uses user defined list of patterns to cycle between files in VIM. This helps in programming languages like C++ to cycle between source and header files.

Example

If you have src/somefile.cpp currently opened in VIM buffer and next variable defined in .vimrc

let g:swap_files_groups = [['src/{}.cpp', 'include/{}.h']]

calling function in VIM command line

:SwapFiles

will open new/existing buffer with include/somefile.h, if file exists. Calling the SwapFiles again will open src/somefile.cpp.

Configuration

Set g:swap_files_groups to define patterns. {} is a wildcard for filename.

let g:swap_files_groups = [['src/{}.cpp', 'include/{}.h'], ['{}.cuh', '{}.cu']]

Jumping Between Files

Call :SwapFiles to cycle between files.

Installation

Requirements

VIM needs to support python3. Check the output of the :version to verify.

Install using vim-plug

  • Add next line into .vimrc
Plug 'tdakhran/vim-swapfiles'
  • Execute vim +PlugInstall +qall

Configure

let g:swap_files_groups = [['src/{}.cpp', 'include/{}.h']]

About

vim plugin that help to navigate between source and header files.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0