vim-plugin

Vim: Is vertical tab list possible?

与世无争的帅哥 提交于 2019-12-05 02:24:41
Is it possible to have vim's tab list presented vertically on the left side of the editor? It'd be really helpful, but I haven't managed find any plugins that can do this yet. (do i suck at google?) Randy Morris It seems to me as though you are using tabs as buffers. I'd politely ask that you take a second to read this answer if that is indeed the case. I'd also strongly urge you to change this habit. However, if you are indeed using tabs for this purpose you could potentially get a 'vertical tab list' by issuing :ls to list the buffers. You could also use one of the many buffer explorer

Sublime code-like method browser in Vim

余生颓废 提交于 2019-12-05 01:34:43
问题 Sublime code has a shortcut Super-R which opens a method browser listing all methods in current class (Ruby). Is there a plugin to get similar functionality in Vim? "/def " or "m]" work only if you're familiar with the class and know what method you want to go to, whereas Super+R works for just exploring a class. 回答1: The TagList plugin is another (very popular) option. There are a bunch of others. FYI, /def and m] are not the equivalent of Sublime Text's Ctrl + R . That would be :tag foo

Favourite places in vim

无人久伴 提交于 2019-12-04 19:18:02
问题 Is there a command in vim that can bookmark a place (path to the file, line number in that file), so that I can go to that place easily later? It would be similar as NERDTree :Bookmark command. You can open your file with NERDTreeFromBookmark . I'm looking for the same functionality with the difference that bookmark is not only a file but file + line number. Thank you 回答1: The viminfo setting can contain the option ! , which makes it store any global variables with uppercase letters in the

How to make cursor change in different modes in vim?

别来无恙 提交于 2019-12-04 17:07:27
How can I make Vim change cursor in different modes so that these conditions are satisfied: Without using gconftool or such tools. I need this affect only one instance of Vim, not the whole terminal. This must be working in Gnome Terminal and GVim . PS : I have tried changing with sample in help gcr , but it only works for GVim, and not Vim in Gnome terminal. PPS : I have tested http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes , but it changed the cursor for the whole terminal. PPPS :Playing with gcr is preferred. Billy Chan I've encountered the same problem before and tried a

How to use second argument (input) of system() function

放肆的年华 提交于 2019-12-04 11:20:09
The documentation to vim's system function says this about the second argument: When {input} is given, this string is written to a file and passed as stdin to the command. What I understood from that was that if your system call looked like this: call system('node something.js --file', 'here is some text') The command executed would look like this: node something.js --file some/temp/file and some/temp/file would have the text here is some text as its contents. To test this, I ran the vim command (the second line is the result): :echo system('cat', 'here is some text') here is some text Ok,

Package(Plugin) Management for Vim

僤鯓⒐⒋嵵緔 提交于 2019-12-04 07:39:17
问题 Emacs 24 looks like it will have a package manager. What package management options are there for Vim? 回答1: I am now using VimPlug for my own Vim setup, and I definitely recommend it. Installation is very simple, and it is fast, pretty and effective! I used to recommend Vundle in this answer. But Vundle is no longer maintained, and there are better alternatives. 回答2: Plugin management for vim used to be a pain in the traditional way by spreading plugin files across the whole personal vim

Vim - How to make your own mapping repeatable?

不羁岁月 提交于 2019-12-04 03:28:22
问题 I have following mappings in my vimrc: nmap <Leader>h1 yyp<c-v>$r= nmap <Leader>h2 yyp<c-v>$r- I'd like to repeat <Leader>h1/2 with . There exist the repeat.vim plugin by Tim Pope with following usage line silent! call repeat#set("\<Plug>MyWonderFulMap", v:count) I tried using it in the following way: nnoremap <silent> <Plug>MyWonderfulMap :normal yyp<c-v>$r= silent! call repeat#set("\<Plug>MyWonderfulMap", v:count) nmap <Leader>h1 <Plug>MyWonderfulMap It does not work. I know it is not a

VimL: Checking if function exists

别说谁变了你拦得住时间么 提交于 2019-12-03 10:51:12
right now I'm cleaning up my .vimrc file to make sure it's compatible on most systems. In my statusline I use a function that another plugin sets, the GitBranchInfoString() function introduced by this plugin . What I wanna do is check if this function is set, and only then add it to the statusline. It would be in it's own line so I just need to check for it. What would be the simplest way to accomplish this? Thanks for all your help! EDIT: I have the following: if exists('*GitBranchInfoString') let &stl.='%{GitBranchInfoString()}' endif Use if exists("*GitBranchInfoString") " do stuff here

Migrating to Vim from RubyMine - Interpreted Auto completion

主宰稳场 提交于 2019-12-03 08:31:35
Up until last week, I had been using RubyMine for my Rails development. I know it has a vim plugin but I have been working on migrating my development to vim and tmux. I don't want to keep using the mouse and VIM gives me a lot more flexibility. I have found plugins and workarounds for almost all the features I care about except the "interpreted auto complete" functionality in my first screenshot below. RubyMine interprets the whole rails application and offers sorted-by-relevance suggestions (as you can see, it's showing me instance variables and methods for the class in question and the

Vim plugin to generate Javascript Documentation comments

做~自己de王妃 提交于 2019-12-03 08:24:50
Is there a plugin for vim, somewhat like Jsbeautify, which automatically generates JavaDoc like comments in the script files. For example it will take this function(a , b , c){ } and return /** * Description. * * @param a Description. * @param b Description. * @param c Description. */ function(a , b , c){ } claus Here's a little something to get you started - tweak as required!-) " generate doc comment template map <LocalLeader>/ :call GenerateDOCComment()<cr> function! GenerateDOCComment() let l = line('.') let i = indent(l) let pre = repeat(' ',i) let text = getline(l) let params = matchstr