Hot answers tagged

30 votes
Accepted

How do I get +clipboard support in Fedora 20?

So, installing vim-enhanced and vim-X11 is enough, but is not at the same time. To enable the system funtcions like +clipboard, you moreover need to use the vimx executable rather than vim or vi (even ...
user avatar
  • 1,121
28 votes
Accepted

How do I use the system clipboard with Vim in Arch Linux?

Ok. Apparently on native vim in Arch there is no support for X so the +clipboard feature is missing. To fix this, install gvim, which although conflicts with vim, which was my initial problem with it,...
user avatar
  • 766
20 votes
Accepted

Scroll the screen, not the cursor, when using scrollwheel

As @Doorknob said in his comment, :set mouse=a fixes the problem.
user avatar
  • 1,037
13 votes

Can Vim add to the X11 clipboard or primary buffers without an external utility?

TL;DR: This isn't really possible without a clipboard manager (e.g. clipit, diodon, glipper, parcellite). It's an explicit design choice of X to not store the data for the X selections, whether that'...
user avatar
  • 10.4k
10 votes

Colorscheme's background not correct in terminal

There's two reasons why I think this may be happening: The solarized color scheme you are using does not declare ctermfg and ctermbg for any of the features you want to highlight. Try out this color ...
user avatar
6 votes

Define custom commands for the * and + registers

A few <expr> mapping should be able to do the job here. The basic structure would be function! ClipboardOrXclip(command, register) if a:register !~ '[+*]' || has('xterm_clipboard') || has('...
user avatar
  • 10.4k
6 votes
Accepted

Colorscheme's background not correct in terminal

Great news, everyone. @Tom and @Rich set me on the right path. I found a solution provided here. I set my .vimrc to the simple syntax enable set background=dark set t_Co=16 colorscheme solarized ...
user avatar
  • 191
4 votes

How to safely switch from vim-athena to vim-gtk?

You don't have to uninstall any of the existing packages. The vim-{athena,gtk,gtk3,nox} etc. packages just provide the Vim binary built with different feature sets and linked against different GUI ...
user avatar
  • 10.4k
4 votes

Install Vim with +clipboard support but without Gvim?

If you don't mind having gvim installed you can run gvim in commandline mode with gvim -v. Then you should have a version of commandline vim able to access the keyboard. Also if gvim is invoked as vim ...
user avatar
4 votes

Colorscheme's background not correct in terminal

I guess it is an issue of compatibility of this colorscheme with terminal. The plugin csaprox miraculously solve a bunch of this issues. Synopsis: It's hard to find colorschemes for terminal Vim. ...
user avatar
4 votes

Colorscheme's background not correct in terminal

The solarized terminal-Vim colorscheme can work in one of two different ways. A 16-colour mode: Solarized only contains 16 colours, so in this mode you set your terminal to use the solarized colours ...
user avatar
  • 28.3k
4 votes

Raise window holding swap file

One solution would be to use a single instance of vim per project, which would prevent this issue unless your multiple projects had overlapping files. I'm going to assume that you are looking for a ...
user avatar
  • 191
3 votes

Scroll the screen, not the cursor, when using scrollwheel

I know this is a few years late, but you can use nmap <Down> <C-e> nmap <Up> <C-y> This worked for me.
user avatar
3 votes

Raise window holding swap file

Long lost and almost forgotten. Meant to re-factor the code etc. but post is as is. This code is used on a 32-bit system. Not sure how it would behave on 64-bit (or other). Have a hack in C-code ...
user avatar
  • 1,207
3 votes

Colorscheme's background not correct in terminal

Seems like you found your answer. I had this same problem and nothing above worked. What worked for me was using altercation's terminalrc, as opposed to sgerrand's. My relevant vimrc is simply: ...
user avatar
3 votes

Install Vim with +clipboard support but without Gvim?

Building Vim from the source with the right flags is the general solution. git clone https://github.com/vim/vim.git cd vim/src ./configure --with-x=yes --disable-gui The last command will probably ...
user avatar
  • 2,236
1 vote
Accepted

Disable Shift+Insert from pasting from Primary

I found a solution which relies on Vim's +clientserver capability. It just took a small addition to a script I already used. The final result is this vimserver.sh: #!/bin/sh if [ -z "$(vim --...
user avatar
  • 2,236
1 vote

How can I make gvim keyboard language-agnostic in command mode?

One option is to use the plugins https://github.com/lyokha/vim-xkbswitch or https://github.com/rlue/vim-barbaric, which switch the input method in vim's input mode using xkbswitch.
user avatar
  • 12.8k
1 vote

Colorscheme's background not correct in terminal

So this is what works for me (on all terminals I used to use – xterm, konsole, gnome-terminal, iterm2, roxterm – on both Linux and OS X, also with gvim and macvim): " no other configuration than this ...
user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible