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

1
vote
1answer
24 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
39 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 %<CR>:!...
1
vote
1answer
17 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
20 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
32 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
396 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 gvim....
0
votes
1answer
16 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 ...
1
vote
0answers
112 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
58 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
57 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
35 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
17 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
46 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 Notepad++...
0
votes
1answer
290 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
30 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
81 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
31 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
201 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
28 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
38 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
60 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
64 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 ...
2
votes
2answers
22 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
28 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 blocks),...
0
votes
1answer
43 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
34 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
165 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
53 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
112 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
31 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
26 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
94 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, here'...
1
vote
1answer
23 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)?
1
vote
1answer
14 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
26 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?
5
votes
1answer
234 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 ...
0
votes
0answers
25 views

Can I make vim highlight argument _names_ in C/C++ prototypes?

Can I make vim highlight argument names in C/C++ prototypes? Doesn't need to be perfect (handle function arguments, etc.).
0
votes
1answer
60 views

Moving lines between split windows in vim

I have two files, say a.txt and b.txt, in the same session of vim and I split the screen so I have file a.txt in the upper window and b.txt in the lower window. I want to move lines here and there ...
2
votes
2answers
68 views

Can't copy certain gvim text, eg :version or error messages

Generally, my copy/paste works just fine in vim. However, when I type :version, my mouse pointer becomes a symbol like: While I can select text, I can't copy it to the clipboard. Exactly the same ...
1
vote
2answers
52 views

How to purge all tabs for spaces in all C files in a directory?

I'm trying to fix the style in a directory of about 60 .c and .h files. This can be taken in steps (e.g. I don't have to figure out find and vim script syntax at the same time), but ultimately I want ...
0
votes
1answer
144 views

Solarized in Konsole + tmux + vim

Solarized color scheme works fine when using Konsole + vim, but I can't figure out how to properly configure my computer for a Konsole + tmux +vim usage (please see screenshots on the links). Below, ...
2
votes
1answer
24 views

Folding specific sections of code in vim

I'm wondering if it is possible to automatically fold only specific sections of code in vim (specifically for python files). I'm currently using the indent fold method. And I would like to only fold ...
1
vote
1answer
70 views

Remove any leading spaces (not including tabs)

I'm trying to remove leading spaces in vim but not touch tabs. For instance, if each of the lines below have a leading tab, but b_line has an additional two spaces, how can I just remove those two ...
0
votes
0answers
34 views

vim pre patched fonts doesnt work in powerline

I've installed gvim and powerline plugin. I downloaded pre patched fonts and did everything like the readme file says and still got that weird looking fonts in powerline. I cleared the cache, even ...
0
votes
0answers
57 views

Setting up Eclim with Git Bash Windows 7

So I followed the instructions to get Eclim working on command prompt and it works, I can use the command :PingEclim and it gives me the relevant information when im running eclimd.bat. So all is ...
0
votes
2answers
37 views

Vim causing auto compile on file write

I recently installed some plugins on vim, and since then every file write is triggering a build process, showing errors in the file (here's a C++ file): The problem is, I'm pretty new to vim and am ...
0
votes
0answers
28 views

Vim in Cygwin skips keypresses

My Cygwin installation works fine except when I code in vim, it skips the keys I press, and it happens annoyingly often. I don't seem to have this problem when I am in the bash, but when I start ...
2
votes
0answers
82 views

Windows gVim, shell starts in HOME instead of working directory

I've recently have gotten sick of constantly switching between Windows and Linux and installed gVim and MSYS2 on Windows 7. After a couple hours of searching I have a .vimrc that makes !command, make, ...
0
votes
1answer
19 views

vim user defined command: reopen current file for editing

I have a user defined command in vim that does a chmod on the current file. Once that's done, reopen the current file for editing (with the newly updated properties) by issuing: :e[dit]! I'd like ...
0
votes
1answer
22 views

Restore previous vim window height

Many windows in vim can are opened in some predefined layouts (e.g. copen or :Gstatus). However, further layout changes will disrupt original widow height. I often end up with windows of height 1 or 2 ...