Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions autoload/qiita.vim
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ endfunction

function! s:gettags(tags_string)
if len(a:tags_string) == 0
return []
return [{'name':''}]
endif

let tags_list = split(a:tags_string, '\s\+')
Expand Down Expand Up @@ -299,20 +299,12 @@ function! s:write_item(api, id, title, tags, content)
endtry
else
redraw | echon 'Posting item... '
if len(a:tags) == 0
if len(&ft) == 0
let l:tags = [{'name': 'text'}]
else
let l:tags = [{'name': &ft}]
endif
else
let l:tags = a:tags
endif
call s:fix_tags(a:tags)
try
let item = a:api.post_item({
\ 'title': a:title,
\ 'body': a:content,
\ 'tags': l:tags,
\ 'tags': a:tags,
\ 'private': v:false,
\})
catch
Expand Down