vim-plugin

How to write a VIM color scheme?

左心房为你撑大大i 提交于 2019-12-20 08:39:00
问题 I have been looking around for VIM color schemes and found some great ones out there (esp. by using http://code.google.com/p/vimcolorschemetest/), but I always want to change a few aspects of each one I find. So I've decided now that what I really want to do is make my own, or be able to customize the ones I find on the fly. Basically, what I want to know is: 1) How do I write a vim color scheme -- are there any good (quick) tutorials? 2) How do I add language-specific customizations? Like

How to write a VIM color scheme?

风流意气都作罢 提交于 2019-12-20 08:38:32
问题 I have been looking around for VIM color schemes and found some great ones out there (esp. by using http://code.google.com/p/vimcolorschemetest/), but I always want to change a few aspects of each one I find. So I've decided now that what I really want to do is make my own, or be able to customize the ones I find on the fly. Basically, what I want to know is: 1) How do I write a vim color scheme -- are there any good (quick) tutorials? 2) How do I add language-specific customizations? Like

How do I get the value returned from a function in Python & Vimscript?

孤街醉人 提交于 2019-12-20 01:52:07
问题 I'm using Python to write a vim plugin, but there's something wrong when dealing with Vimscript. function! Login() python << EOF import vim, weibo appkey = 'xxx' appsecret = 'xxxxx' callback_url = 'xxxxxxxx' acs_token = 'xxxxx' expr_in = 'xxxx' client = weibo.APIClient(app_key=appkey, app_secret=appsecret,\ redirect_uri=callback_url) client.set_access_token(acs_token, expr_in) del vim.current.buffer[:] EOF return client endfunction function! Post() python << EOF import vim, weibo try: vim

gvim pathogen issues

空扰寡人 提交于 2019-12-19 09:03:24
问题 I downloaded pathogen.vim from github and put it in "autoload" directory under ~/.vim. However now when I fire up gvim, and do :helptags, it says "Argument required". The contents of my ~/.vimrc file are: call pathogen#runtime_append_all_bundles() call pathogen#helptags() What am I missing? Thanks. Andy PS: I am doing this so that I can install Nerdtree --- EDIT 1 --- Based on what I have seen so far, the pathogen.vim plugin from github did not work for me, so I had to download it from vim

Add GoLang syntax highlighting for VIM

青春壹個敷衍的年華 提交于 2019-12-18 10:14:27
问题 I'm trying to add Go language syntax highlighting to VIM on ubuntu with resources and direction supplied here http://go-lang.cat-v.org/text-editors/vim/. Go comes with a go.vim file that contains syntax settings for VIM and the above page offers the following instructions Place $GOROOT/misc/vim/syntax/go.vim in ~/.vim/syntax/ and put the following in ~/.vim/ftdetect/go.vim: au BufRead,BufNewFile *.go set filetype=go This is more or less the same vein of procedure for customizing vim syntax I

vim: Open tag in new tab

醉酒当歌 提交于 2019-12-18 10:05:01
问题 Is there a plugin or script to open ctags entries in a new tab? I'd like to put my cursor over a function, press ctrl+] and have the entry open in another tab. I'd also like if I visually select an entry, for ctrl+] to still work and open in a new vim tab. 回答1: You can C-w C-] C-w T To achieve that effect Then you can also map that: :nnoremap <silent><Leader><C-]> <C-w><C-]><C-w>T Edit: also, depending on what you actually want, don't forget you can open tags in preview ( :ptag ) with e.g. C

Automatic closing brackets for Vim [closed]

我只是一个虾纸丫 提交于 2019-12-17 08:20:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Is there any WORKING plugin for Vim 7.4 that would automatically close brackets ('{}', '[]', '()') and maybe insert some carriage returns (for '{}' at least)? I know this question has been asked quite a few times but none of the answers either do not seem to work in vim 7.4 or the plugin has not been updated or

Vim/command-T: Ignoring “gem-name” because its extensions are not built. Try gem pristine “gem-name”

笑着哭i 提交于 2019-12-12 19:18:01
问题 Whenever I open the command-T plugin for the first time in MacVim, I get the following terminal: Ignoring atomic-1.1.13 because its extensions are not built. Try: gem pristine atomic-1.1.13 Ignoring atomic-1.1.10 because its extensions are not built. Try: gem pristine atomic-1.1.10 Ignoring bcrypt-3.1.7 because its extensions are not built. Try: gem pristine bcrypt-3.1.7 Ignoring bcrypt-ruby-3.0.1 because its extensions are not built. Try: gem pristine bcrypt-ruby-3.0.1 Ignoring eventmachine

Vim: how to enter insert-anywhere/canvas mode?

混江龙づ霸主 提交于 2019-12-12 09:39:35
问题 How can you put vim in an insert mode where the entire screen is effectively whitespace i.e. you can type anywhere? I know it's possible, I just cannot remember the command, unfortunately! This allows you to draw diagrams and whatnot easily, I hope this rings a bell? Update: Thanks to @phd I made: ┏━━━[ Tasker Radars ]━━━┓ ┃ 🔴 has 1 mile radius ┃ ,,ggddY''''Ybbgg,, ┃ 🔵 has 5 mile radius ┃ ,agd''' `''bg, ┃ 🌕 has 20 mile radius ┃ ,gdP' 'Ybg, ┗━━━━━━━━━━━━━━━━━━━━━━━┛ ,dP' 'Yb, ,dP' _,,ddP'''Ybb

How can I customize “comment marker” in Vim

喜夏-厌秋 提交于 2019-12-12 01:53:08
问题 When setting the formatoptions to include the o flag, pressing o or O on a commented line will "inherit" the leading comment marker. However, for Stata , only \\ had been recognized as a "valid comment". The other two types of commenting had been ignored, by the set formatoptions+=o . May I name multiple leading characters/strings to be the "comment marker" in Vim? Here goes how "comment lines" had been defined in the syntax file for Stata . (From C:/vim/vimfiles/syntax/stata.vim ) " comments