Last active
January 21, 2016 07:46
-
-
Save YasuakiHirano/a5f7235b5f5b4e2a7ff8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! -nargs=* StrCnt call s:StrCnt(<f-args>) | |
" def:文字列に連番を付ける | |
" param: str 文字列 | |
" param: num 最大値 | |
function! s:StrCnt(str, num) | |
let i = 0 | |
let input = "" | |
while i < a:num | |
let input .= a:str.i."\n" | |
let i = i + 1 | |
endwhile | |
let pos = getpos(".") | |
execute ":normal a" . input | |
call setpos('.', pos) | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment