Merge branch 'release/v0.0.2'

pull/8/head v0.0.2
mandlm 2019-10-18 14:55:19 +02:00
commit 5f98da2e0d
3 changed files with 36 additions and 3 deletions

View File

@ -1,4 +1,4 @@
function! SplitOpenFile(filename)
function splitopen#SplitOpenFile(filename)
execute("tabedit " . a:filename)
let l:file_extension = tolower(fnamemodify(a:filename, ":e"))
if l:file_extension == "cpp"
@ -9,5 +9,3 @@ function! SplitOpenFile(filename)
execute("wincmd h")
endif
endfunction
command! -nargs=1 SplitOpen :call SplitOpenFile("<args>")

34
doc/splitopen.txt Normal file
View File

@ -0,0 +1,34 @@
*splitopen.txt* opens file-pairs in a new split-window tab
================================================================================
CONTENTS *SplitOpenContents*
1. Usage ..................................|SplitOpenUsage|
2. License ................................|SplitOpenLicense|
3. Changelog ..............................|SplitOpenChangelog|
================================================================================
1. Usage *SplitOpenUsage*
Use
:SplitOpen filename
with a .cpp or .h file as filename to open a new tab containing a vertical split
with the corresponding header file in the left window and the corresponding
source file in the right window.
================================================================================
2. License *SplitOpenLicense*
SplitOpen is GPL-3.0 licensed. See LICENSE file for more info.
================================================================================
3. Changelog *SplitOpenChangelog*
v0.0.2
* Added delay-loading
* Added documentation
v0.0.1
* Initial release

1
plugin/splitopen.vim Normal file
View File

@ -0,0 +1 @@
command -nargs=1 SplitOpen :call splitopen#SplitOpenFile("<args>")