Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.

learn more… | top users | synonyms

0
votes
0answers
8 views

Vim insert mode changes the font defined in ~/.Xresources

Background I am running Arch Linux with the i3 WM. I am trying to customize the font in Xterm by editing ~/.Xresources as every online resource online has told me to. What i have done I add the ...
0
votes
0answers
3 views

How to set the default filetype when editing a text field in gVim with Pentadactyl?

When editing a text field in Pentadactyl (or Vimperator) pressing C-i will copy its contents to a temporary file, which is then opened in an external editor (that defaults to gVim). Since this file ...
0
votes
2answers
25 views

Why does Vim break lines when editing Windows files?

On Windows 8, I want to edit with Vim (v7.4), files that were originally created with Windows Notepad. However, when I begin to write, Vim/gVim spontaneously breaks lines into smaller ones by ...
0
votes
0answers
15 views

Synchronize clipboard with ssh + tmux + vim + iterm2

I just want to make local copies from vim, and paste them on the remote vim, or vice versa. I know, there are dozens of posts, but I cannot make the clipboard sync on my configuration. I have tried ...
0
votes
1answer
10 views

How to make vim syntax highlight quoted text in .tex file?

In emacs, the text quoted between `` and '' are highlighted as green. It comes in handy sometimes. I believe should be possible to also do it in latex. But I don't know how. I checked the tex.vim in ...
0
votes
1answer
23 views

Vim E488 trailing characters but I don't see any trailing characters in file

Im opening the vimrc file with the following command vim ~/.bash_profile. Here's the error message and also the vim file contents. I actually get this error when ever I open any file with VIM. Error ...
0
votes
1answer
19 views

Null key mappings in console vim on OS X

Running in zsh on Mac OS X's Terminal.app. The following 2 keybindings do work in MacVim, but not console vim (7.4) inoremap <c-space> <c-x><c-o> inoremap <c-@> ...
0
votes
0answers
7 views

Vim hilight group for selected text in status bar

For example, if I type :cd ..\ then press TAB, the StatusLine will display my completion options. What vim highlight group does the currently-selected completion option fall under? Bonus: In C/C++, ...
0
votes
0answers
11 views

Can't import python module in .vimrc

So, I decided to try out powerline in vim, and for that reason I installed pypy using brew. I installed macvim as well and it is compiled with python support. Following powerline installation ...
0
votes
1answer
14 views

Import previous commands to edited command

I'm playing with zsh to change image modification time according to the 'Date/Time Original' exif attribute. For this I one command I do: PDATE=$(exiftool -p '$DateTimeOriginal' $PIC | sed 's/[: ...
6
votes
1answer
113 views

vimperator: Using external editor (e.g., vim) to edit Stack Overflow text

Utilities like vimperator allow editing content of HTML form fields in an external editor. With vimperator there is shortcut Ctrl+I which, when in an edit box, opens the text in an external editor. ...
0
votes
0answers
9 views

How do you add Python syntax highlighting to a markdown file in vim?

For Vim how do I add Python syntax highlighting to markdown files? Context I'm creating a markdown document to show how to use a project. Fairly simple thing if __name__ == "__main__": ...
0
votes
0answers
14 views

Better way to unexclude single folder in .gitignore

I have several files in my home directory under version control. My .gitignore looks like this: #gitignore * !.vimrc !*/ !.vim/* !.gitignore !.xinitrc !.bashrc to include .vim/* I had to include ...
1
vote
1answer
12 views

How can I unconditionally open any fold present, without errors, when invoking from the command-line?

So, this is similar to ‘execute command with range silently’; but that's in a mapping, and so the solution isn't applicable to what I'm trying to do. I'm using the Skim PDF-viewer with LaTeX Sync, ...
1
vote
1answer
18 views

Vim not showing longer unicode characters

I wanted to add an unicode image of cat to my file, but when I press ctrl+v u 1 f 4 3 1 the result is ὃ1 rather than 🐱. Vim always stops reading the code after the fourth character and then it just ...
0
votes
1answer
27 views

Filetype shortcuts in vim

I added 4 following lines to my vimrc file to add shortcuts (to run current *.html buffer in browser and to run current *.js file in node): autocmd filetype html map <C-S-F10> :sav ...
1
vote
1answer
15 views

Wrap certain types of lines to different text widths?

I have text set to wrap at 80 characters. Is it possible to have text wrapped to, say, 50 characters when editing a certain type of line? For example, I program Ruby and I want Ruby comments to be ...
0
votes
1answer
14 views

Why does `:tab all` open most files in new tabs and some in a one tab split horizontally?

I want to open all the files from the current directory matching *.c. I do it using :args *.c :tab all However my vim opens the first nine files in new tabs and the last six in the last tab and ...
0
votes
0answers
27 views

How to make location-list focused?

I'm using Syntastic Vim extension which shows errors in location-list window. When I open location list with :lopen I can choose any location by moving up and down with k and j then press Enter to ...
0
votes
2answers
39 views

Setting up vim under Win 10

I try to setup vim, which is quite difficult for me. Personally I prefer to run programs via the cmd. So I set the home path of my vim 7.4 via advance settings, so that I can use the command ...
0
votes
1answer
13 views

After deletion in vim, how can I automatically capitalize the new beginning of the sentence?

I am writing my thesis in vim. Often, I realize that I want to remove the first few words of the sentence and, rather than write a different opening, simply capitalize the new beginning of the ...
0
votes
0answers
18 views

How to setup in `~/.vimrc` a mapping for `colorscheme` to toggle `solarized` between `dark` and `light`?

How to setup in ~/.vimrc a mapping for colorscheme to toggle solarized between dark and light? Both background and colorscheme in ~/.vimrc are badly misbehaving! I have setup solarized to work on ...
1
vote
1answer
28 views

Windows gvim - use unix grep

Using Windows 10. I have gvim installed. I also have git, and I have git's bin in my PATH (C:\program files (x86)\Git\bin), which puts git's gnu grep in my path so I can use it in the command shell. ...
0
votes
0answers
17 views

Installation of Plugin-Manager *Vundle* for vim failed

I followed the installation instructions on the project site, but when I open vim it doesn't even find the vundle help when typing :h vundle, neither works :PluginList(E117: Unknown function) Here is ...
0
votes
2answers
25 views

Why isn't my foldmethod being set in my ftplugin file?

I have a file called $HOME/.vim/ftplugin/stylus.vim with this contents: setlocal foldmethod=indent setlocal foldnestmax=1 setlocal foldlevelstart=1 echo 'Stylus file loaded!' Everything except ...
0
votes
0answers
16 views

to restore the contents of the console after exiting from vim in cygwin(windows 7)

I have cygwin installed on windows 7. While working with cygwin and vim, i see that the contents on the console are getting cleared. I would like to restore the contents. Is there a solution to this ...
0
votes
1answer
41 views

Notepad++ or Vim Document Wrap or Text File Wrap

This is going to sound weird, bear with me. I am not looking for the regular word wrap, which I already know how to toggle. Is there any possibility to do a "document wrap" or "text wrap" in ...
0
votes
1answer
44 views

E464: Ambiguous use of user-defined command

When I try to go to the end of a file in vim by doing :G I get the following: E464: Ambiguous use of user-defined command I don't know why it's saying this. Where can I see a list of user-defined ...
0
votes
1answer
23 views

Wrap lines in vim's scratch buffer but not elsewhere

I have set nowrap in my vim config file but there's one place where I need line wrapping: the scratch buffer (because the text that shows up there usually doesn't stick to 80 columns). Is there a ...
1
vote
2answers
67 views

What makes VIM such a powerful text editor? [closed]

I read around around the web and many people tend to praise emacs and VIM for their power and versatibility. But to keep things more specific I want to focus on VIM. What makes it so versatile? What ...
3
votes
1answer
25 views

How to keep cursor horizontal position while scrolling in Vim

This question looks like How to keep cursor horizontal position while scrolling in VIM? but it's actually not. Vim always tries to snap the cursor to the first non-whitespace character of the ...
0
votes
1answer
39 views

Vim error - E138: Can't write viminfo file

I have already checked several similar links but nothing worked. Before i explain the issue, i was earlier getting following message while saving any file: vim e509 Cannot create backup file (add ! ...
1
vote
2answers
22 views

How do you run a vim command that is the text inside a buffer?

For example lets say this text is inside buffer %s/a/b/gI How do I run that as a vim command, without typing it inside the vim command line. Regards
0
votes
0answers
20 views

External editor support in vimfx+firefox

In vimperator, I can use Ctrl+I to edit input in vim. Is there any equivalent in vimfx plugin for firefox? I am liking simpler interface vimfx provides but without external editor support, I find it ...
0
votes
1answer
44 views

Replace 8 spaces tabs with 4 spaces tabs

I added set tabstop=4 set softtabstop=4 set shiftwidth=4 to my .vimrc file. But tabs in my existing files are still taking 8 spaces. How can I update them?
1
vote
1answer
30 views

Execute Command on VIM Exit, And View the Output

I use vim for editing my PHP scripts, and I would like vim to automatically execute php -l on any *.php file that I exit to do a syntax check. I've set this autocmd in my ~/.vimrc file: autocmd ...
3
votes
2answers
20 views

Map Alt-k to delete line (by default bound to dd) in .vimrc

I'd like to map deletion of a line in vim to Alt-k rather than the default of dd (as is done in Emacs or somewhere similar) and put the mapping in .vimrc I'm struggling as a novice with vim. The ...
0
votes
0answers
13 views

VIM auto indentation

I am using VIM with Pathogen, vim-jsx, and vim-javascript. I have trouble getting the correct indentation. When I am breaking one line that is too long into several pieces (without adding new ...
0
votes
1answer
20 views

vim - sync across multiple OSes with dropbox

So I decided to take the plunge into learning vim and moving over from sublime as my main editor. I have a few different machines running different OSes. OSX on my laptop, Linux on my primary machine ...
0
votes
0answers
21 views

Remap any key to F5 Vim

I am trying to remap a key (I do not matter which) to F5 key because my physical keyboard hasn't got F1 - F12 keys. How can I do it? I have tried to use nnoremap but I am doing something wrong. I have ...
0
votes
0answers
52 views

Sending F1 - F12 key with external keyboard with missing keys on an iPad Pro using SSH emulation software

I am using an iPad Pro with an external keyboard (Smart Keyboard) for connecting via SSH (via Serverauditor) to an Ubuntu remote server in which I have the tex distribution installed. I use VIM to ...
0
votes
0answers
51 views

Can't display my Vim colorscheme in Windows

For some reason my Vim will not display the colorscheme that I just configured. I added the following lines in _vimrc: syntax enable colorscheme darktango set tabstop=4 set shiftwidth=4 set ...
4
votes
1answer
50 views

How to auto format code from the command line?

Let's say I have a JavaScript in someRandomFile.js and I want to run a command like: formatMyCode someRandomFile.js Then inside the file it just indent everything in a nice way. I want to do ...
0
votes
0answers
25 views

How to bind S-Spacebar to work identically to spacebar?

When typing in Vim I find myself slowed down significantly by the fact that Shift-Space doesn't advance the cursor, so if I'm typing fluidly and I try to type a capital letter or symbol followed by a ...
0
votes
2answers
19 views

How to show ident level on vim instead of tab markings?

my .vimrc shows vertical lines so i can follow identation blocks easily, like pretty much every single text editor/IDE. if(x == 1){ | if( y == 1){ | | y(); | } } is there any way i can make ...
0
votes
1answer
42 views

Terminator/vim Mouse Issue

Let me start off with saying that I do try to use the mouse in vim as little as possible, but there are times that I will end up using it to click around or highlight something. With that said, ...
1
vote
0answers
14 views

How to keep Vim's visual mode selection while scrolling with Ctrl-F?

When I select text in Vim's visual mode, scrolling with Ctrl-F cancels the selection. How can I keep the selection while scrolling (with Ctrl-F)?
2
votes
1answer
12 views

vim finding all extensions associated with a filetype

How can I find all file extensions that will use specific filetype (highlighting)? For example I know that both ".xml" and ".xmi" files will by opened as "xml" filetype, however I would like to find ...
-1
votes
1answer
24 views

Print tag folder in vim

I got this line in my .vimrc so that it look i parent directories untill it find a tag file. set tags=./tags; Is there a way to print the directory where vim found the tag file inside vim?
3
votes
1answer
58 views

Show current file size in vim editor

I'm heavily using Vim to edit and work with my files, now I'm starting to open big files and it would be useful to see the file size directly from VIM itself. Is there a way to show the current file ...