vim

Drag drop open file in Macvim split window?

Hello. I like to use the split window feature in Vim. However I cannot seem to drag drop new files into the different sections. Doing so will just open a new tab. I don't like using tabs as I still need to flick between them and not much different to using separate windows. Is there anyway I can change this behaviour? It works fine o...

Vim with split frame of buffers or file listing

Similar in appearance to Vim as a note taking platform (SO), I would like a pane with a list of open buffers that can be used as a jump to list. This is one feature in many IDEs and other advanced editors that is missing. Having a dozen buffers or so open becomes confusing as to which buffer is where. ...

How can I get vim to draw lines correctly for remote editing?

I'm attempting to edit files on a remote system. I've ssh'd to the system and I start editing with vim. However, I notice that all the lines are drawing 2 lines above where they really exist in the file. I assumed this was a problem I could fix by dropping my terminal settings to something simpler, but that didn't help. My TERM varia...

How can I configure vim so that when I send the process a USR1 signal it saves and quits (as opposed to creating the .swp recovery file)

Here's my situation. I have a bunch of vim processes open. Rather than go through one by one and save/quite (:x!) I'd like to send all of the processes a signal - say USR1 - and instead of having it create a recovery .swp file, I'd like it to save the file and exit normally. Possible? ...

How to execute Vim commands in a file, like .vimrc?

I need to create a file with a list of commands (in particular key mappings) that I may sometimes need, like a .vimrc that I can execute inside Vim when I need them. ...

Community Wiki: "Vim: Advanced usage of the yanking mechanism".

Community Wiki As the documentation of the yank system shows (thanks Michal), The Vim yank system seems to be more intricate then a standard clipboard. I therefore think it beneficial if vim veterans could perhaps show us some different styles of making use of this mechanism. particularly with the usage of vim for complicated projects w...

Does deleting 'M'odified line in SVN Commit have an effect

When running the commandsvn ci you get a text editor that allows you to place a comment, below that is there is the text "--This line, and those below, will be ignored--", then the files modified, added, or deleted. If I were to delete a line such as: M folderA/fileA Would it remove that file from the check in, or is that just an SVN ...

CursorLine highlight in ViM, highlight only line number and spaces/tabs on beginning /end of the line

Hi, I use ViM's :highlight CursorLine to change bg color on the current line. But sometimes is the text not readable. I would like a highlight that could only change bg color for the whole line except the text (counting the spaces/tabs in between chars as text). Is it doable? If yes, how? Thanks ;) ...

Vim error E492: Not an editor command: dd

I started learning vim today and installed it using sudo apt-get install vim Now, when I try to do something like :5dd it gives me the not an editor command error. I'm not sure why this is. Am I doing anything wrong? I looked at tutorials and everywhere I look I see that 5dd is a valid command. ...

Lua jump to right line

I have a makefile that looks like: default: lua blah.lua Now, in Vim, I type ":make". There's an error in my Lua code; it gives a file name + line number. I would like Vim to jump to the right file/line. How do I make this happen? ...

How to shortcut diamond character in vim

In the dictionary file, which I am editing I often need to insert character "◊" on place of <>. Is there a way to map "◊" to some key so that I press "r" for replace and then my_shortcut to have <> replaced by "◊"? I found a way to make imap mapping in .vimrc: :imap <> ◊ But changing to inset mode is sub-optimal, would that be possibl...

vim + c++: insert a uuid in a guard clause

I'm trying to automate file comment headers. I'm stuck trying to figure out how to insert the result of the uuidgen command into my header using vim's autocmd. Inside the header, the placeholder text is present, like this: #ifndef _UUID_ #define _UUID_ // Code goes here! #endif // _UUID_ The autocmd line to populate _UUID_ in .vimr...

like-vim emacs ruby indentation

ruby-mode from svn, looks equal to 1.1 version here is emacs indentation of hash User.all({ :joins => :account, :conditions => {:delete_at => nil} }) here is the same in vim User.all({ :joins => :account, :conditions => {:delete_at => nil} }) How to make emacs indent like vim in ruby-mode? ...

Find what filetype is loaded in vim

As soon as I load any file in vim, It'll try to detect the file and color-highlight it if possible. I want to know a vim command that will tell me which ftplugin or Filetype plugin / filetype is vim considering to highlight the file. ...

How can I open a Shell inside a Vim Window?

I can open a shell by using the :shell command in Vim, however I can't edit a file and at the same time use the shell. Is there any way to split Vim in many Windows (or tabs), and have a shell opened in one of them? ...

Is there a command in Vimscript to get the current Operating System?

What the title says. I can think of some hackish ways to do it, but is there a correct way to do this? ...

How do you cancel an external git diff?

I've got vim setup as my external diff tool: [diff] external = git_diff_wrapper #!/bin/sh vimdiff "$2" "$5" Say I have 300 files that have been modified; via bash, I type "git diff". It launches 300 vimdiffs sequentially, how do I abort it? ...

How to show tab character while using expandtab setting in vim

In my .gvimrc I have following lines: set listchars=tab:\.\ ,trail:- set softtabstop=2 set shiftwidth=2 set tabstop=2 set expandtab When I change last line to set noexpandtab the indents can be seen and marked with . Is there a way to make vim treat expanded tabs like "normal" tab so that list option works as expected? ...

Can't get "syntax on" to work in my gvim.

(I'm new to Linux and Vim, and I'm trying to learn Vim but I'm having some issues with it that I can't seen do fix) I'm in a Linux installation (Ubuntu 8.04) that I can't update, using Vim 7.1.138. My vim installation is in /usr/share/vim/vim71/. /home/user/ My .vimrc file is in /home/user/.vimrc, as follows: fun! MySys() return ...

Notepad++ like "multi editing" in VIM?

I'm switching from Notepad++ to VIM as main text editor. Notepad++ can have multiple cursors by holding down ctrl and clicking anywhere in the text, so if you type, the text appears in multiple locations. Is it possible in vim? Something like insert after selecting multiple rows in visual mode, but with the possibility to have cursors ...