Graphical mode for vim (vi improved).

learn more… | top users | synonyms

18
votes
3answers
8k views

Buffers or tabs in vim? What are advantages/disadvantages of each approach?

I'm used to modeless editors. Only the past year I've been using vim/gvim, which has a modal approach. I'm used to tabs in all editors, since before vim all of them are used to it. In gvim, you don't ...
12
votes
2answers
6k views

Best way to upgrade vim/gvim to 7.3 in Ubuntu 10.04?

I have to use Ubuntu 10.04 at work, and cant upgrade it. I'm using Vim/gVim 7.2. I want to upgrade it to 7.3 (with Python and Ruby extension support). Which is the best way? Add an entry in ...
12
votes
2answers
2k views

vim - open file and goto line number using <filename>:<line nbr>:

Several tools such as grep, py.test, etc ... use the pattern <FileName>:<line number>: to point to errors. For example: ; grep -Hn Common setup.cfg setup.cfg:11: Common How can I ...
11
votes
1answer
8k views

Vim - Get Current Directory

I'm currently adding a little bit of Git functionality to my menu.vim file, and for using a certain command (Gitk) I need to find out Vim's current directory. How does one do that and include it in a ...
7
votes
4answers
12k views

Advantages (or downsides) of GVim over Vim to edit code

Should I install vim or GVim ? I develop mainly Ruby on Rails (I also use IDE's, but different topic). Are there any differences or advantage of using Gvim vs vim ?
7
votes
1answer
524 views

Note-taking and outlining using Vi: On startup, highlight tags and display tags in a preview window [duplicate]

I am using vi as a note-taking and outlining tool and therefore I thought that this stackexchange site would be appropriate to ask this question. I am constructing the "tags" file by myself. What I ...
6
votes
1answer
3k views

How to automatically refresh Vim on buffer/window focus?

I often use Control+L to redraw the screen in Vim. In particular, when I come out of sleep or change monitor configurations I often find that Vim needs to be redrawn. I thought it might be simpler to ...
6
votes
2answers
2k views

vim shortcut to open a file under cursor in an already opened window

In vim you can open a file under the cursor by using the gf command. One can also easily open that file in a new split window by hitting <c-w> f. This is a really nice and time saving feature. ...
5
votes
1answer
502 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 ...
4
votes
1answer
97 views

How can I uniquely identify different GVim instances?

With gnome-terminal, I can use the --role command line argument to make the new terminal window uniquely identifiable by the window manager or other applications, for example: gnome-terminal ...
4
votes
3answers
675 views

gVim opening a tab pushes status line out of window

When opening a new tab in gVim (with :tabe), the status line at the bottom of the screen disappears. If I press : and start typing a command I can no longer see the command on the status line. When ...
3
votes
3answers
72 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 ...
3
votes
1answer
736 views

How can I set check interval for set autoread option in VIM

How can I set check interval for set autoread option in VIM? Is it possible?
3
votes
1answer
139 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 ...
3
votes
1answer
278 views

Vim emulation in IDEs vs gVim as IDE

I am currently using gVim as editor and cannot think about going back to mode-less editing. I code in Java for Android and in Python for another project. While trying to set up gVim as my primary ...
3
votes
1answer
161 views

Changing gVim behaviour on Red Hat

I recently had to change my Linux work environment from a personal Ubuntu system (having full admin rights) to a corporate Red Hat system (having very limited control on the system). Both running ...
3
votes
1answer
2k 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 ...
3
votes
1answer
813 views

GVim compiled from source does not use gtk2

I have two HP-UX machines say A and B with HP-UX 11.11 and 11.31 respectively. I'have compiled gvim 7.3 from source an B, and gvim 7.0 on A. On A, gvim uses "version with GTK GUI", Compilation with ...
3
votes
1answer
816 views

Using vim/gvim as editor for Thunderbird

Is there a way to use vim/gvim as an editor for thunderbird? There was an add-on for it but it is now very out of date.
2
votes
1answer
3k views

Install Gvim after vim

I would like to run vim via X11 (over SSH). Vim comes pre-installed on my NAS (running Debian), however the GUI is not. When I run vim -g, I get this error: E25: GUI cannot be used: Not enabled at ...
2
votes
2answers
187 views

visudo/sudoedit and gvim --remote-silent

Is it possible to use gvim --remote-silent and similar as an editor for visudo and sudoedit? Actually, I don't think this is related to the --remote option. Even if I set Defaults editor = ...
2
votes
1answer
144 views

`crontab -e: E212: Can't open file for writing` when using gvim (works with vi)

As a user, I want to edit my crontab. crontab -e gvim is launched. It prints "/tmp/crontab.IUVYhK/crontab" [New DIRECTORY] I can write but as soon as I try to write the temporary file, I get ...
2
votes
1answer
436 views

How to let pacman notice the ruby installed by rbenv?

I use rbenv to manage ruby versions. I want to install gvim on my ArchLinux and one of it's dependency is ruby. I'm already use rbenv to install the version 2.0.0-p247 of ruby as root ...
2
votes
2answers
561 views

Setting programming font in RHEL 5 + gvim

I am working on RedHat RHEL5. I want to change the font in GVIM. The only font format that my GVIM accepts is *-courier-medium-r-normal-*-*-140-*-*-m-*-* It refuses to use Courier\ New or ...
2
votes
2answers
1k views

gvim colors the same as is the terminal

Is there a command I can put in the .vimrc to make gvim look like vim's setup in the terminal? Same back ground, syntax highlighting, colors, and font. To add to my question, is there a may for gvim ...
1
vote
3answers
6k views

gvim on RHEL (Red Hat Enterprise Linux) install in home directory

How to install gvim on a RHEL server that doesn't have it (for use with SSH with X11 forwarding*)? No sudo access is available, so it has to be in the user's home directory. *Getting all the ...
1
vote
1answer
1k views

Vim powerline plugin colour of Normal mode

I installed vim-powerline and was wondering how to change the backlground colour of the normal mode -- currently set to #adf000 according to the Gimp -- to something else. I assume that the change ...
1
vote
3answers
222 views

Pasting with spaces added into heads of lines (analogy to comment-chars)?

Please, consider a situation, where you find a nice example and want to copy it to your existing code to see, how it works. The indentation is almost never right right away. If there are several ...
1
vote
2answers
96 views

Make gvim scroll to the center after opening a file with line numbers?

When I open a file with gvim with the following command line option, gvim file +5 I would like the current line (the 5th line) be scrolled to the center of gVIM's window, Is that possible? ...
1
vote
1answer
430 views

Gtk application (Gvim) rendering troubleshooting

When I switch from gvim to another application and then after some time switch back gvim window appears blank with cursor blinking in the middle. Sometimes toolbar and tabs look like a white space. ...
1
vote
1answer
247 views

C++ header/source files in file chooser

By convention, our C++ headers live in .hpp files. When I open a gvim window with a .cpp file (so C++ source), then use the open menus, I get file chooser window which allows me to select files for: ...
1
vote
1answer
214 views

Vim visual selection method differs between Windows & Linux?

In Linux vim and gvim, I can make a visual selection by pressing V (e.g., v VISUAL or Shift+V VISUAL LINE), releasing it, and using movement keys (e.g., arrows) to highlight the desired text. In ...
1
vote
3answers
91 views

Applying a change to every line?

How to add 4 spaces to every line between marks (bound with m-letter and current line). How to do the same when using visual block?
1
vote
1answer
298 views

File open in tabs automatically

I want to set up vim so that it opens automatically in tab and not in buffers. I know that I could use alias gvim='gvim -p' or some such shell mapping but I am wondering if there is a way to do that ...
1
vote
1answer
39 views

gvim search query for mixed AND & OR conditions

Hi I want to search text inside gvim with the following criteria a&b&(c|d). I know for a&b it is /.*a\&.*b and for c|d it is /c\|d but combining these two doesnt work. what can be the ...
1
vote
1answer
127 views

Which libraries are needed tom compile vim with gui (gvim) on OpenSUSE?

I have been trying to compile vim with a GUI interface (gvim) on OpenSUSE 13.1 for a while now. I thought all the required libraries were installed, but apparently not. These are the relevant lines ...
1
vote
0answers
66 views

Emacs and gvim display no content on FreeBSD 10.2

I just installed FreeBSD 10.2 with the Mate desktop environment and most things seem to work. I have a problem with emacs and gvim though. Since the problem has the same symptoms with both editors, I ...
1
vote
0answers
36 views

Why does xargs gvim --remote also open a blank file?

If I run ack foo | xargs gvim, then gVim opens each named file in a separate buffer in a new instance of gVim. This is good. However, if I run ack foo | xargs gvim --remote, without gVim already ...
1
vote
1answer
4k 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 ...
1
vote
0answers
55 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 ...
0
votes
2answers
1k views

(g)vim - NerdTree and tagbar above each other left to edited file?

Any chance to get (g)vim displaying NerdTree and tagbar above each other left to edited file? +-----------+-------------+ | nerd tree | edited file | | contents | | +-----------+ ...
0
votes
1answer
49 views

Show colors in gVim embedded terminal

Does anyone know how to show colors in the gVim embedded terminal? For instance when you do a !git diff file.c.
0
votes
1answer
33 views

Wrap all lines with character sequence in vim

So basically I copy/pasted some code, and I need to prepend and append some more code to each line. Each line is a function call, and is getting added to a switch statement as it's own case. Right ...
0
votes
2answers
305 views

vim how to keep cursor position while copying text

I am (having to) using gvim in windows. I was used to the linux environment where when I select text using mouse the cursor position wont change. Now , with gvim in windows, My problem is something ...
0
votes
2answers
580 views

Calendar.vim E492: Not an editor command: Calendar

I am trying to install the calendar.vim plugin on mac osx snow leopard running gvim. I have pathogen.vim installed, so I followed the instructions on github to install calendar.vim from the terminal: ...
0
votes
1answer
535 views

Gvim opening files in new tabs

I was wondering how I can modify the gvim.desktop file so that it opens files in new tabs. Also I want it to create a new instance of vim in case it is not supplied with any files(eg. Invoked from ...
0
votes
0answers
21 views

vim: map capital 'Y' in .vimrc does not work

If I try to map capital 'Y' in my vimrc, this is getting ignored. For example, if I put something like nmap Y :w<CR> in my vimrc, this has no effect. However if I run vim and I enter :nmap Y ...
0
votes
0answers
37 views

vim frequently does not display text

My vim frequently does not display (some) text in terminal. It just shows blank area. If I attempt to select (either through mouse or keyboard), the text would appear. The issue is more severe in ...
0
votes
0answers
44 views

screen flashes when I press ^S in gvim

I bind ^S in gvim, by: map <C-S> :w<CR> Now if I press the ^S combination, althrough file is saved (I saw the XXX written message), but gvim window flashes, is there a way to avoid that? ...
0
votes
0answers
86 views

mapping <C-F9> in gvim: no response

I'm trying to map <C-F9> in gvim (note the "g"). No response. Neither <C-V><C-F9> nor <C-K><C-F9> produce any response either so I suspect it's not sending any keycode at ...