All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
686 views

Personal syntax highlighting

I tried to change the syntax highlighting, by copying /usr/share/vim/vim74/syntax/html.vim to ~/.vim/after/syntax/html.vim. Then I changed the syntax highlighting file, but I don't see any changes. ...
3
votes
1answer
86 views

What plugin manager allows installing plugins from tags

I am searching for a plugin manager that has the option to install specific plugins only from tags on GitHub. I don't want to need to specify the tag. I want it to automatically use the newest tag. ...
2
votes
1answer
69 views

Difference between autoformat and autoindent

What is difference between autoformat and autoindent? What are most popular solutions in text formating in vim of both of these methods?
1
vote
2answers
1k views

Quickfix Window not Opening Automatically

I have realized that the quickfix window isn't opening automatically when it's supposed to. I have tested this on both Gvim and vim 7.4 on Windows 10 Version 10.0.10586 Build 10586. I have a few ...
4
votes
1answer
138 views

errorformat for Java junit output

I am trying to get VIM to jump to the file listed in the error. So the following is the error. || 1) test01(ErrorTest0) || java.lang.NullPointerException || at Line.equals(Line.java:43) || at ...
4
votes
2answers
102 views

Make a frequent RSpec edit easy & repeatable

Writing unit tests in RSpec, I frequently change something like this, it 'eats pizza' do pizza = build(:pizza) expect(subject.eats?(pizza)).to be_true end to this, let(:pizza) { build(:pizza) } ...
3
votes
1answer
119 views

Swap choices: how can I “skip” instead of “quit” or “abort”?

Swap file ".file.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: I usually see this message when I accidentally :edit the wrong file, i.e., one which I'm already ...
3
votes
1answer
174 views

How can I drag a file onto MacVim and make it open in a split, not a new tab?

I have MacVim 7.1 (patch level 903). When I drag a file onto it from the Finder, desktop, etc., it opens in a new tab. However, I would prefer that it open in a split. According to :help drag-n-drop, ...
9
votes
2answers
5k views

Multiline Search and Replace

Would like to perform a search and replace in a file with 12000 lines. Specifically, if an occurrence of ^ SetFontSize 28 exists after a ^Hide block and before the next ^Hide or ^Show, change 28 ...
3
votes
0answers
175 views

Directory symlink browsing moves me to new location when autochdir is set

I have a symlinked directory as such: ~/nested Which points to this directory: ~/whatever/yetanother/andanother/nested When I launch gvim or command line vim (7.4, with the standard, built-in ...
3
votes
1answer
59 views

Discard command-line contents when receiving remote keys

If Vim command-line is being edited and the Vim instance receives a string due to vim --remote-send KEYS executed on a shell somewhere, result is somewhat equivalent to pressing Return in the command-...
3
votes
2answers
258 views

How to declare commands local to a plugin?

Writing a vim plugin, I can use function! s:InternalMethod() endfunction for InternalMethod to be local to the plugin environment. It will not be directly available to users nor overwrite their ...
3
votes
0answers
71 views

Can I use Ag in combination with YouCompleteMe for tag autocompletion? [closed]

I have setup vim to use Ag for grepping and for use in the CtrlP plugin. For tag autocompletion, I am using YouCompleteMe. To get autocompletion suggestions for functions throughout the whole project,...
4
votes
0answers
50 views

How can I specify the movement direction for text objects?

How can I specify a direction (for going backwards) for commands working on text objects like 2caw? E.g. I like to make 2caw replace bbb ccc in aaa bbb ccc ddd while on c.
3
votes
2answers
2k views

Search entire file for a pattern; every time it's found, delete up until a certain character appears

I'm trying to search for the string /c in the entire file, and when it's found I'd like to delete everything - including the /c itself - up until the next occurrence of / (but not the / itself). For ...
3
votes
1answer
885 views

java completion

I am always having problems, this time with java auto completion. I try to use the installation mentioned here, so that I can use vim to do my android development. However, after the installation, on ...
2
votes
0answers
46 views

Why does append(…, readfile()) add a zero when run using Ctrl-R?

While looking for ways to solve How can I create a /* comments section with /// like in XCode?, I cam across this puzzling behaviour. Say I have foo.txt containing: /*! * @author Robbie Yi JIANG, 29-...
5
votes
1answer
483 views

Vim Function to Send Highlighted Text to a Git Commit

Problem: Suppose I have the following text in my vim buffer: This is a commit msg. Suppose further I have a git repo located at ~/my_repo. Goal: Make a vim script so that I can highlight the text ...
5
votes
1answer
447 views

How can I replace array(some_data) to [some_data]?

We are switching from array() to [] in our php code. And when I start to do code refactoring I found that almost all arrays are specified with array() and not with []. How can I substitute it by vim? ...
3
votes
1answer
101 views

vimdiff marks wrong line as added when first line in change is new

When the first line(s) in a change are new/added, and subsequent lines are changed, Vim marks the first lines as changed up the number of lines occupied by the original lefthand file, and the ...
5
votes
1answer
52 views

How do I remove the special highlighting on `rnu` numbers?

I spent a lot of time getting vim to look just the way I want, but nornu and rnu number modes look different. Is there any way to disable the special highlighting when in rnu mode? nornu rnu
4
votes
2answers
7k views

How to find multiple instances of same character on single line?

I have a CSV that uses ,(comma) as the delimiter. This CSV is nearly 20K lines long and there are 10 instances where a comma was used INSIDE the data. These errant commas are breaking my processor. ...
10
votes
2answers
2k views

Gundo plugin requires python 2.4 when version 2.7 is installed

I have Python 2.7.9 installed. And now I get the message that the Gundo plugin requires 2.4. Is there a workaround? Here is my vimrc file: set nocompatible " be iMproved, required ...
2
votes
1answer
680 views

Make Vim highlight the match for the paren *before* the cursor

I've had a look at :h matchparen, and it doesn't seem to have an option for highlighting the match for the parenthesis immediately before the cursor. In short, this is what I want: Matchparen should ...
8
votes
3answers
426 views

How can I create a /* comments section with /// like in XCode?

In XCode, there is an add-on called vvdocument, which can detect three / hits, and transfer /// into: /*! * @author Robbie Yi JIANG, 29-Jan-2016 14:01:45 * * */ How can I do this in Vim.
3
votes
1answer
408 views

Clang complete, disable precompiled headers

Sometime in the past little while either the clang on the systems I use (Fedora) were updated to use precompiled headers by default, or else my re-install of the clang complete git plugin from github ...
2
votes
0answers
76 views

How do I resolve Error E108: No such variable: “b:eclim_tab_id” in textfmt plugin v3.0?

I manually installed the txtfmt plugin (Brett Stahlman's The Vim Highlighter) ver 3.0. After trying to run :MakeTestPage, I get the following error: Error detected while processing function <SNR&...
3
votes
1answer
196 views

How I can make inputdialog() behave like input() on GUI?

I use dbext.vim for any database related work so I have several connections configured on my _vimrc and when I need to switch between them I use the DBPromptForBufferParameters that this plugin ...
11
votes
1answer
2k views

Not able to type Unicode with Gvim and VIM on Windows 7

I want to type in different languages using (g)Vim. But when I switch to another language using language bar (Devanagari or Hindi characters), and type anything, (g)vim displays ??? ??. What I tried:...
7
votes
2answers
3k views

How to repeat last action with movement?

Assume the content: foo fnord bar;" >> /tmp/foo/derp gnarf foo fnord bar;" >> /tmp/foo/derp I want to jump to the " and delete to end of line and repeat that over the rest of lines. Yet ...
11
votes
1answer
316 views

Experimenting with vim/gvim in “virgin” mode

Sometimes, I would like to try a trick I find in the internet. It is often helpful to try this in vim (gvim if it is a gui trick), in virgin mode, i.e., without loading all my ~/.vimrc stuff. Do you ...
5
votes
1answer
440 views

Vim split overflow

On some files, a line (often the status line) overflows straight onto the next line, which screws up rendering until the size changes (when I close/resize a vertical split etc). This also happens ...
8
votes
2answers
640 views

How safe is it to use an unknown `_vimrc` or `vimscript` file?

I do not know if this question should be asked here or not. In almost every language, malware exists. Is the same also applicable for vimscript? Suppose vim is running with high system privileges. Is ...
7
votes
1answer
678 views

How to override the '=' command?

I cannot convince vim to apply the coding-style I'd like to (cindent and friends). However, integrating clang-format.py (which uses the .clang-format of my project) actually makes me totally happy. ...
9
votes
5answers
3k views

How to copy each line 11 times, incrementing the last “1” in each line from 2-12

I have a number of lines in a file, and I would like to copy each line 11 times (turning each line into 12 lines), and increment the last "1" in each line so that the 12 lines have "1" through "12", ...
2
votes
0answers
393 views

gvim on windows - compiled ycm plugin now crashing on start

I installed the YouCompleteMe(YCM) plugin and compiled it using the provided instructions, one after the other for all options excluding rust. Below is a reproduction of the commands I ran, the reason ...
9
votes
1answer
894 views

NeoVim hides the * chars when editing markdown

I am using tpope's vim-markdown plugin to edit markdown files. Somehow, neovim hides the _ and * chars and changes the text in between to italic or bold depending on quantity of chars. I want to see ...
8
votes
2answers
844 views

How do I make list of search results editable?

There are several times, I need to grep for some_pattern in some XHTML files (many a time, file count in a specified folder goes beyond 10K+). Previously, I have used Lugaru's Epsilon Programmer's ...
1
vote
1answer
279 views

How can I get path from vim-rooter's function and run it with QuickRun's makeprg?

How can I run vim-rooter's function FindRootDirectory() instead of /vagrant/my_project? I have tried multiple variations like: set makeprg=FindRootDirectory().'/app/Console/cake test '.expand('%:p') ...
4
votes
2answers
541 views

How to run custom console command and output results to QuickRun without pressing any key on keyboard?

Thanks to @muru I was able to run and output the data to QuickRun by the :make command and this setting in my .vimrc: set makeprg=/vagrant/my_project/app/Console/cake\ test\ app\ Console/Command/...
6
votes
1answer
866 views

How to cut/trim line in statusline?

I'm trying to cut string returned from fugitive plugin. It returns branch name of current file. By default returned string is Git(branchname) and this is why I want to get rid of odd Git(..) wrapper. ...
6
votes
1answer
2k views

Paste from clipboard into CtrlP input in GVim

Using CtrlP with GVim I often need to open a file with the name from the system clipboard (on Windows). So my workflow should be: Ctrl+P {somehow paste name from the clipboard} Select file and open ...
8
votes
1answer
72 views

Define text object that depends on the current operator

I'm curious if it is possible to make a text object aware of its operator. In particular, I am writing a text object for LaTeX environments, where I want different behaviour depending on the operator. ...
2
votes
2answers
179 views

How can I get path from vim-rooter's function and add it to another path VIM

I have this in my .vimrc let $ROOTPATH=FindRootDirectory() nnoremap <leader>ct :!clear<CR>:!$ROOTPATH/app/Console/cake test %:p<CR> Is there a way I can write this in one line? ...
4
votes
1answer
196 views

Test `.in` files in Java program

I have a folder with some input files (text files with extention .in). In same folder, I have made a Java program. I want to test the input of all the input files in this Java program. In a GUI, I ...
2
votes
0answers
23 views

Remap last autocompletion word [duplicate]

I want to map Ctrl-M to go to the last autocompletion word. Currently, Ctrl-P does this. In my .vimrc: inoremap <c-m> <c-p> And this adds the functionality I want. However, if I'm in ...
8
votes
4answers
905 views

Switching .c/.h buffers

I normally work with 2 windows, vertically split. The problem I would like to solve, is: easily jumping back and forth from header <-> implementation file I'm investigating, without luck, 2 ways ...
2
votes
1answer
53 views

Can I set German spell checking to ignore the case of nouns?

German nouns are normally spelt w/ a capital first letter, but can I make the spell checker stop caring about that?
4
votes
4answers
2k views

Project Wide replace using Ag

Referencing Post: https://stackoverflow.com/questions/22206332/vim-ag-search-and-replace-globally-and-within-a-directory Specifically: :Ag foo :Qfdo s/foo/bar/c I type Ag miwt-os, I get this: ...
2
votes
0answers
156 views

Formatting with par, better padding

I've started using set formatprg=par\ 66q\ g1\ j " keep double spaces, justify which makes beautifully justified paragraphs. But it would be better if the algorithm preferred to pad after .:;, in ...

15 30 50 per page
1
149 150
151
152 153
190