Skip to content

Instantly share code, notes, and snippets.

@choplin
Created August 21, 2012 10:43
Show Gist options
  • Select an option

  • Save choplin/3414435 to your computer and use it in GitHub Desktop.

Select an option

Save choplin/3414435 to your computer and use it in GitHub Desktop.
nnoremap <SID>[tweetvim] <Nop>
nmap <Leader>t <SID>[tweetvim]
nnoremap <silent> <SID>[tweetvim]s :<C-u>TweetVimSay<CR>
nnoremap <silent> <SID>[tweetvim]t :<C-u>call <SID>tweetvim_open('TweetVimHomeTimeline')<CR>
nnoremap <silent> <SID>[tweetvim]m :<C-u>call <SID>tweetvim_open('TweetVimMentions')<CR>gnmgn
function! s:check_tweetvim_buffer()
let bufnlist = tabpagebuflist()
for num in bufnlist
if getbufvar(num, '&filetype') ==# 'tweetvim'
return 1
endif
endfor
return 0
endfunction
function! s:tweetvim_open(cmd)
execute (s:check_tweetvim_buffer() ? '' : 'botright split |').a:cmd
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment