vim

How can I use gvim for svn commit messages under Windows?

拈花ヽ惹草 提交于 2019-12-22 04:31:14
问题 Under *nix I can set SVN_EDITOR to gvim --nofork to do the trick, but that doesn't seem to work under Windows. Is there any solution for that? 回答1: If you have installed the batch files (c:\windows\gvim.bat), just set EDITOR to gvim -f , the batch file processes the -f argument and sets the no-fork option. The trick in the batch file is running START /WAIT path\to\gvim.exe %* (see the /WAIT argument). If you don't have the batch files, just create a new one with the command above, and set

How can I use gvim for svn commit messages under Windows?

时光毁灭记忆、已成空白 提交于 2019-12-22 04:31:07
问题 Under *nix I can set SVN_EDITOR to gvim --nofork to do the trick, but that doesn't seem to work under Windows. Is there any solution for that? 回答1: If you have installed the batch files (c:\windows\gvim.bat), just set EDITOR to gvim -f , the batch file processes the -f argument and sets the no-fork option. The trick in the batch file is running START /WAIT path\to\gvim.exe %* (see the /WAIT argument). If you don't have the batch files, just create a new one with the command above, and set

Vim plugin - custom auto-complete of params in command-mode

旧街凉风 提交于 2019-12-22 04:20:25
问题 I'm writing my first vim plugin (viml + python). One command that the plugin has is "GetStepCommand()" and it basically fetches data from a remote data source, I massage the data a bit and copies it into the buffer so the user can start editing it. There is a parameter that the user has to supply to "GetStepsCommand" and that is the search path to where the data resides, for ex: /projects/procedure/step Now that path can be long and its easy to miss-spell something. So I wanted to implement

Delete a specific Column in VIM/gvim with out using Visual Block mode

一世执手 提交于 2019-12-22 04:17:07
问题 Sample Input File +--------------------+---------+--------- | Name | S1 | S2 +--------------------+---------+--------- | A | -4.703 | -2.378 | B | -3283.2 | -3204.5 | C | 8779 | 7302 | D | 22078 | 18018 +--------------------+---------+--------- It is required to remove the S1 Column, i.e Desired Output +--------------------+--------- | Name | S2 +--------------------+--------- | A | -2.378 | B | -3205.5 | C | 7302 | D | 18018 +--------------------+--------- Can anyone help with this thanks

Macvim won't load specific color scheme by default

心已入冬 提交于 2019-12-22 04:13:38
问题 I'm having a problem similar to VIM Color scheme not loading by default Except I am having the problem with the gentooish theme found here http://www.vim.org/scripts/script.php?script_id=2474 For some reason macvim refuses to load this colorscheme by default. My vimrc file is as follows, I do not have a .gvimrc file. :set term=xterm-256color :set t_Co=256 set background=dark colorscheme gentooish But once I have macvim opened if I do :colorscheme gentooish it will load fine. Also it does load

Get position of splitted windows on a vim editor

亡梦爱人 提交于 2019-12-22 03:58:13
问题 I've been trying to find out how the get the position/coordinates of a splitt window inside a vim editor window, but no luck so far. Say for example I have this layout (0,0) (2, 0) \____________/____________ | | | | Split A | Split C | (0,2)-+------------+----------+ | Split B | Split D | |____________|__________| #Split D would be (2, 2) I want to get the coordinates of the different splits on of my Vim Window, is this possible? I've done my homework and googled this, also went through the

Vim: delete empty lines around cursor

无人久伴 提交于 2019-12-22 03:52:46
问题 Suppose I'm editing the following document (* = cursor): Lions Tigers Kittens Puppies * Humans What sequence can I use to delete the surrounding white space so that I'm left with: Lions Tigers Kittens Puppies * Humans Note: I'm looking for an answer that handles any number of empty lines, not just this exact case. EDIT 1: Line numbers are unknown and I only want to effect the span my cursor is in. EDIT 2: Edited example to show I need to preserve leading whitespace on edges Thanks 回答1: Easy.

Annoying vim (un)indent rules

馋奶兔 提交于 2019-12-22 03:51:12
问题 When editing PHP code (I'm not sure if it's specific to that language) and I create a new line in the middle of comma-separated lists that span multiple lines, the indent rules always unindent the line I'm leaving. Here's a video of it. This happens in arrays, function argument lists, etc. Is there anything I can do to stop this from happening, or any quicker methods of fixing the error than moving up, re-indenting it, moving down, re-indenting (since it gets cleared when you leave the line),

How to enable “Very magic” mode in vim with vimrc?

余生长醉 提交于 2019-12-22 03:44:43
问题 When search something, always typing \v is quite boring. How to write .vimrc to make it the default regular expression mode? 回答1: I don't think there is a dedicated setting (like :set magic ) but I have this line in my ~/.vimrc : nnoremap / /\v that make every forward search "very magic". 来源: https://stackoverflow.com/questions/9273133/how-to-enable-very-magic-mode-in-vim-with-vimrc

How to find struct member uses with cscope and ignore local variables?

余生颓废 提交于 2019-12-22 03:42:41
问题 I'm using cscope for a large project with vim, but without the vim mappings (they froze vim for some weird reason). I'm using cscope commands from within vim, and I want to be able to find uses of structure members throughout the code. Suppose I have something like this: 1 typedef struct _s{ 2 3 int x; 4 } S; 5 6 int main(){ 7 8 int x = 1; 9 10 S my_s; 11 12 my_s.x = 5; 13 14 return my_s.x; 15 } If I issue the command 'cs f s x' it will return both S's member variable and the local main