vim (Vi IMproved) is a text editor supporting different editing modes.

learn more… | top users | synonyms

-1
votes
1answer
18 views

Best vim setup for my workflow [on hold]

I am using vim as my primary editor for programming (doing ssh on a remote server). I have tried some plugins for being more productive in programming but I always had issues (example: snipmate ...
1
vote
2answers
30 views

How to open chapters of Vim user manual in Vim

I opened the Vim user manual with the :h user-manual | only command (to open it in one window) and now I want to enter/open the separate text files. I tried to put my cursor over a section, such as ...
2
votes
3answers
60 views

Find and change certain LaTeX coding in vim, using regular expressions?

How can I change the following LaTeX coding: \cite{1,3-7,9} to \cite{1,3,4,5,6,7,9} in vim? I would prefer to use regular expressions.
-2
votes
0answers
20 views

vim switches split afer entering/leaving a folder

I'm using vim as a browser/navigator (e.g., with :e ./). Now, when I enter/leave a folder (e.g. with -), vim switches to another split. This does not occur always, but often enough to irritate me ...
5
votes
2answers
28 views

Color coding html color sequeces in vim

It it possible to setup syntax highlighting in vim so that a html color sequence is colored in that color, e.g. #FF0000 would show up as red. I'd also be ok with it underlining the text that color ...
2
votes
1answer
24 views

Vim: Exit single character replace mode with <C-C> when using `nnoremap <C-C> <silent> <C-C>`

I've become far too trained to use <C-C> to return to normal mode. I understand there is a difference between <C-C> and <ESC> but that's beside the point of this question. I use the ...
1
vote
2answers
28 views

How can I replace ^I into tab spaces in vim editor for .java file?

When I open my .java file in vim, I could see a couple of lines prefixed with one / more ^I characters. It looks like tabs in Eclipse that has got converted into ^I. I would like to replace a single ...
1
vote
1answer
14 views

Using vim-latex with latexmk and evince results in garbled text (GLib-GObject-CRITICAL)

When I compile a latex file in vim with the vim-latex plugin with \ll usinglatexmk, my vim terminal text content gets littered with error messages like the following dispersed through the text: ...
1
vote
2answers
78 views

Vim: join lines by replacing ^M

I have a file which has embedded ^M characters. I wish to join the lines at the ^M character. ie: change this: ^M être, ^M étant, ^M ...
1
vote
0answers
13 views

how to create a v.imrc [duplicate]

I created a macro in vim and stores in key s. example let @s='sample'. I want to write this macro in q.vimrc. How can this possible?. please give a simple sample program.
1
vote
1answer
37 views

Vim delay when using Ctrl+C, but only in SQL files

I'm working on a side project with both JavaScript and SQL source files. When I'm editing the JavaScript, Vim behaves normally. However, when I'm editing the SQL files, there's about a one-second ...
1
vote
0answers
31 views

How to make a vimrc? [closed]

I made a macro and stored in key 's' and stored by using like that: :let @s='macro_name' I want to write this macro in q.vimrc (for the use of my collegues). How is this possible?
2
votes
2answers
83 views

How do I change the colour of text matching a regex in vim?

Suppose I want to make all text that matches some regex persistently and automatically (and without affecting / searches) appear in a different color. How would I do this in vim 7.4?
0
votes
2answers
34 views

Skip search and replace after a heading in Vim

I have to replace a pattern, but I don't want to replace it after a particular word. This is my program: :vnoremap ::silent! call Bib() function! Bib() %s/\s*\n*{\\&}\s*\n*/ /g ...
1
vote
2answers
50 views

How do I open all files in the current directory and all subdirectories using vim?

So far I've been using vim */** which seems to open all files in subdirectories but not those in the current directory, and vim * which opens all files in the current directory. But how do I open all ...
1
vote
2answers
26 views

refresh changed content of file opened in vi(m)

I have a config-file that I keep open in vim, but that sometimes gets changed on disk, without these changes being reflected on the terminal. Can I refresh the content on the screen without closing ...
1
vote
1answer
27 views

Can you further integrate and present sequential moreutils vipe command output in vim using successive splits etc?

I have used the moreutils suite a few times and I find it makes you think further about base utilities and is insightful(and fun). For instance, vipe allows running an editor - like vim - in the ...
3
votes
2answers
32 views

Keymaping for re-indent source code in Vim

I have key mapping in my ~/.vimrc file that re-indents edited source code on the fly. It looks like as follows: " press F4 to fix indentation in whole file; overwrites marker 'q' position noremap ...
1
vote
2answers
27 views

Specifying height for vertical splits in vim

Usually I am editing two files, A and B, split horizontally. I set it up, so that one buffer would only occupy the first 2 lines at the top of the screen, and the rest is for the other buffer. ...
3
votes
1answer
90 views

VIM as c++ IDE - autocomplete

I'm still learning C++, but I know already some stuff. I used to use Visual Studio, but after I switched to Debian, I was working with Code Blocks. Recently I heard about using VIM as IDE and started ...
6
votes
1answer
83 views

Can I specify the layout of a vsplit command?

When I do the :vsplit command, it always opens the new file on the left side of the screen. Is there a way I can specify I want the new file to open to the right?
0
votes
1answer
26 views

Where should xt.vim be put on osX?

Cracking xDebug open, finally and looking to add the vim formatting file from xDebug.org. It says to "copy" the file to ~/.vim/syntax. But such a directory doesn't exist on osx 10.6. I don't see ...
0
votes
0answers
18 views

Vim FoldColumn color different on Debian / Ubuntu

I sync my .vimrc file between two machines, one running Debian testing and the other Ubuntu. On Debian everything works fine. On Ubuntu, the fold column is gray instead of black, even though black is ...
0
votes
0answers
133 views

YouCompleteMe not working after default install

I was trying to install YouCompleteMe with Vundle and it installed fine (it downloaded the git repository I pointed it to). I went into the folder and ran install.sh with the clang semantics and ...
2
votes
1answer
38 views

How to get vimchat to work in linux

I added Bundle 'throughnothing/vimchat' to my ~/.vimrc file and ran :PluginInstall. That all ran fine, then I added an account and password to the ~/.vim/Bundle/vimchat/config file like this: ...
10
votes
4answers
378 views

vim: hide first n letters of all lines in a file

I am analyzing log file using vim and the format looks like this YYYY-MM-DD HH:MM:SS.USEC PID Name LogText Since Most of the times I don't care about date and time. I want to hide them and just ...
3
votes
1answer
32 views

Hide Vim fold characters

When using Vim to write prose my folds look like this: + # Section A expanded | Lorem ipsum dolor sit amet, consectetur adipisicing elit, | sed do eiusmod tempor incididunt ut labore et dolore magna ...
0
votes
2answers
46 views

What is the difference between “find” and “till” in vim?

I see I can use t c or Tc to move to the next / previous character c I can also use fc or Fc to move to the next / previous character c Is the only difference between them that tc places the ...
1
vote
1answer
36 views

How to align columns of multiple lines at a fixed distance with vim

Here is another one of my vim question (They seem to become my trademark here.). I have a really long file basically consisting of lines of the following form: ;07 :ANZ textv S9_1 9_1_K3_2 ...
9
votes
3answers
108 views

Bash autocomplete with vim command

In bash, autocompletion of paths has recently stopped working when issuing vim commands where the path is deeper than two directories (it continues to work as expected with other commands, such as ls ...
5
votes
0answers
158 views

Bash inside Vim not working properly

In MacVim I'm using Conque to run bash commands inside Vim. I have a problem with the text navigation while using Conque. If I'm at the end of a line of text and press down Alt← I skip a word to the ...
6
votes
1answer
204 views

How can I count the number of words in a file whilst editing the file in vim

I know I can use wc for counting characters, words and lines of files at the command line. Is there any way I can can count the number of words while in vim?
1
vote
1answer
24 views

Filename completion in gvim

for some reason, my filename completion in gvim is not working. In vim, its working properly. Commands and such are, however, completed correctly. I have set wildmode=full. An example: Assume i want ...
1
vote
3answers
72 views

Vim Error 'E212: Cannot open file for writing', when trying to create new files outside of home dir

I am running Wheezy Debian. When I try to create a new file in a directory other than my home directory, such as /var/www, I get the following error in vim: E212: Cannot open file for writing. I ...
2
votes
1answer
49 views

vim: Use different colorscheme when connected over SSH

On my desktop I use the hbrid color scheme in vim, with the preferred colors set for my consoles 16-color palette (as described in the README). However, on my laptop, I use the solarized color ...
0
votes
1answer
50 views

How do I write a command in vim to run multiple commands?

I've written some commands that perform common functions by placing the following in my .vimrc files: command! FixWhitespace %s/ \+$//g command! FixCommas %s/,\S\@=/, /g Now I'd like to create a ...
0
votes
1answer
51 views

(Vim) How to use TAB for indentation in all file types?

I'm using only TAB for indent, so I configure Vim for using only them: set autoindent set noexpandtab set tabstop=4 set shiftwidth=4 But some files (.py) still using spaces. I've search for it and ...
3
votes
1answer
28 views

Calling latex from vim stopped working

When I try to compile my latex document from within vim by issuing: :w|!lualatex % (leaving out the w command does not solve the problem) it compiles but it does not save any files. If I call lualatex ...
1
vote
1answer
77 views

Redirect VI command output to a file

I want to export the output of vi command :set fileencoding to another file. It seems vi's file encoding detection is better than file command. How to do that? I could write a macro with: :set ...
4
votes
1answer
46 views

How do I highlight commas not followed by a space in vim?

I've gotten into the habit of not appending spaces after commas in lists, when coding. To break this habit, I thought I'd get vim to highlight any comma (,) that is not followed by a space. So I've ...
2
votes
2answers
79 views

Can I speed up pasting into vim?

I copied a part of the HTML out of a web page and wanted to save it in a file. For that I started a new vim session in a terminal window, with a (new) filename specified on the commandline, hit i to ...
1
vote
2answers
89 views

Configure bash and/or vim to execute source ~/.bashrc everytime I finish editing it

I would like to execute source ~/.bashrc every time I finish editing a file with vim (i.e. after :wq vim command). How should I configure vim or bash to work that way?
1
vote
1answer
41 views

dot command in Vim, last change?

The dot command in Vim repeats the "last change", but I am not exactly sure what constitutes the "last change". For example, if I type the sequence: A;{ESC}j. Then a semi-colon is appended to ...
2
votes
3answers
59 views

How to enable and use code folding in vim

How can I enable and do code folding in vim? Do I have to change anything in ~/.vimrc? I type z+a and z+c and z+o and nothing happens. code folding on vim.
5
votes
1answer
74 views

Copy/paste across vim without X

In vim, "+p pastes from the system clipboard. However, when working remotely over SSH on a non-GUI box, this is not available. Is it possible to implement copy/paste in this environment? Merely ...
2
votes
1answer
39 views

vim: hide status line in the bottom

Sometimes I work with really small terminal windows and need every piece of space available. So I want to hide the vim status line. I already set laststatus=0 this hides one of the status lines. But ...
4
votes
1answer
65 views

Can we patch an already patched font?

Powerline is some sort of plugin for Vim and Gvim. In order to be more useful it uses fonts that has some pictures (symbols) added to them. In other words they've "patched" the font set. Recently ...
0
votes
2answers
45 views

Insert single successive numbers at the beginning of each line in a text file with Vim

Assume I have a text file containing some strings: string_g string_r string_qqwer string_p string_f string_3qw string_e string_qw And I need to insert increasing or decreasing numbers before the ...
1
vote
0answers
26 views

Open to specific gvim tabs

I have a working environment that I'd like to save via a script. -EDIT: I don't need to save it's state, I just want my script to define it. Though saving state would work too I guess. Currently it ...
4
votes
2answers
61 views

Verify line endings from a text created by perl script

I am interested in seeing the contents of a text file in hex mode. I have tried :%!xxd and the problem is that I can not really understand which hex code represents each letter e.g. when you use an ...