We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e6c54a + aa16142 commit 340638aCopy full SHA for 340638a
autoload/gist.vim
@@ -690,7 +690,7 @@ function! s:GistPostBuffers(private, desc, anonymous) abort
690
return loc
691
endfunction
692
693
-function! gist#Gist(count, line1, line2, ...) abort
+function! gist#Gist(count, bang, line1, line2, ...) abort
694
redraw
695
let bufname = bufname('%')
696
" find GistID: in content , then we should just update
@@ -711,7 +711,9 @@ function! gist#Gist(count, line1, line2, ...) abort
711
echohl ErrorMsg | echomsg 'You don''t have github account. read '':help gist-vim-setup''.' | echohl None
712
return
713
endif
714
- if bufname =~# bufnamemx
+ if a:bang == '!'
715
+ let gistidbuf = ''
716
+ elseif bufname =~# bufnamemx
717
let gistidbuf = matchstr(bufname, bufnamemx)
718
elseif exists('b:gist') && has_key(b:gist, 'id')
719
let gistidbuf = b:gist['id']
doc/gist-vim.txt
@@ -110,6 +110,10 @@ USAGE *:Gist* *gist-vim-usage*
110
>
111
:Gist -b
112
<
113
+- Post as new gist after editing on the buffer.
114
+>
115
+ :Gist!
116
+<
117
==============================================================================
118
TIPS *gist-vim-tips*
119
@@ -159,11 +163,21 @@ If you want to edit all files for gists containing more than one: >
159
163
160
164
let g:gist_get_multiplefile = 1
161
165
162
-
166
If you want to use on GitHub Enterprise: >
167
168
let g:gist_api_url = 'http://your-github-enterprise-domain/api/v3'
169
170
+If you want to open gist with current editing buffers: >
171
+
172
+ let g:gist_edit_with_buffers = 1
173
174
175
176
177
178
+If you want to open gist list/buffer as vertical split: >
179
180
+ let g:gist_list_vsplit = 1
181
182
If you want to update a gist, embed >
183
plugin/gist.vim
@@ -18,6 +18,6 @@ function! s:CompleteArgs(arg_lead,cmdline,cursor_pos)
18
\ ]
19
20
21
-command! -nargs=? -range=% -complete=customlist,s:CompleteArgs Gist :call gist#Gist(<count>, <line1>, <line2>, <f-args>)
+command! -nargs=? -range=% -bang -complete=customlist,s:CompleteArgs Gist :call gist#Gist(<count>, "<bang>", <line1>, <line2>, <f-args>)
22
23
" vim:set et:
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments