Skip to content

VioletJewel/a.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 

Repository files navigation

This is a mirror of http://www.vim.org/scripts/script.php?script_id=31

A few of quick commands to swtich between source files and header files quickly.

:A switches to the header file corresponding to the current file being edited (or vise versa)
:AS splits and switches
:AV vertical splits and switches
:AT new tab and switches
:AN cycles through matches
:IH switches to file under cursor
:IHS splits and switches
:IHV vertical splits and switches
:IHT new tab and switches
:IHN cycles through matches
<plug>(a.ih) switches to file under cursor
<plug>(a.is) switches to the alternate file of file under cursor (e.g. on  <foo.h> switches to foo.cpp)
<plug>(a.ihn) cycles through matches

if you want the normal- or insert-mode mappings above, use for example the following:
nmap <leader>ih <plug>(ih)
nmap <leader>is <plug>(is)
nmap <leader>ihn <plug>(ihn)
imap <c-x><c-a>h <plug>(ih)
imap <c-x><c-a>s <plug>(is)
imap <c-x><c-a>hn <plug>(ihn)

E.g. if you are editing foo.c and need to edit foo.h simply execute :A and you will be editting foo.h, to switch back to foo.c execute :A again. 

Can be configured to support a variety of languages. Builtin support for C, C++ and ADA95

About

Alternate Files quickly (.c --> .h etc)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vim Script 100.0%