Questions tagged [vim]
Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor.
3,719
questions
1
vote
1
answer
2k
views
How do you change the background color for errors in Xoria256 VIM color scheme?
I am wondering how to change the red background color for errors in the Xoria 256 color scheme for VIM. I just can not seem to find which part to change.
UPDATE
The only way I can get the red ...
1
vote
1
answer
486
views
Snipmate plugin in vim inserts a carriage return in all snippets
I'm using snipmate plugin in vim, and started creating some snippets to use in Zope.
Unfortunately, the snippets I'm creating are some html attributes, and everytime I call the snippet, it works as ...
1
vote
1
answer
457
views
How can I get vim to set an ACL on its swap files?
I use vim on an OS X Snow Leopard Server machine. A number of the directories I work in have ACLs (so that various groups of users can access them over AFP) that are inherited. For some reason, when I'...
1
vote
1
answer
346
views
Executing a command in vim from a commandline
I would like to run :helptags ~/.vim/doc in vim, but from command line.
The purpose is to run the command occasionally with other commands to keep
my tools up-to-date (probably in a cron job on my ...
1
vote
1
answer
961
views
Specifying the destination for the pdf output when using pdflatex, from gVim
I am generating a pdf output with pdflatex with the following command in gVim:
:!pdflatex %
This command in turns executes the following in the Command Prompt:
cmd.exe /c pdflatex /testvim.tex
Now,...
1
vote
2
answers
456
views
CleverCSS and Vim
I am using vim with CleverCSS and was wondering if anyone has made a CleverCSS vim syntax file, or if I should make my own. Thank you!
-Nate
1
vote
2
answers
1k
views
Configure Mercurial for extdiff Directory Compare with vim on Windows
I'm running Mercurial from the command line on Windows XP. I've got the extdiff plugin. I wanted
hg vimdiff
to use Vim's DirDiff command. I've tried putting
cmd.vimdiff = gvim
opts.vimdiff = -f '+...
1
vote
0
answers
31
views
Use Vim to edit Applescript file
Is it possible to use Vim to work on applescript files rather than the default Automator or Script Editor program? I searched the webs and couldn't find the same question or an answer anywhere. I ...
1
vote
0
answers
105
views
Issue with Ctrl + Arrow Keys in (Neo)vim using PuTTY
When I establish a SSH connection to my machine using PuTTY, I find that the Control + Arrow keys behave unexpectedly when working with vim or nvim in the bash terminal.
For instance, in Vim, escaping ...
1
vote
0
answers
28
views
Trying to get tab in normal mode(VSCode using the vscode-neovim extension) to move to new cell in a markdown table
I'm seeking assistance with the VSCode-Neovim extension to enhance navigation in markdown tables.
The current markdown extension that I am using is takumisoft68/vscode-markdown-table, which has this ...
1
vote
1
answer
77
views
Vim on Arch: /etc/vimrc can remap keys but not turn off syntax highlighting
Just freshly installed Arch, then installed vim. I added these two lines to my /etc/vimrc:
syntax off
inoremap jk <Esc>
I rebooted. The key remapping now works as expected but syntax ...
1
vote
1
answer
189
views
iTerm 2 ZSH font all one color
Related to
iTerm 2 ZSH colors/themes not showed correctly
Machine: macOS Ventura 13.3
My iTerm2 wont use any other colors than all white (and all black in vim) for my fonts. Can anyone see what I'm ...
1
vote
0
answers
64
views
how to save a session, including unsaved changes to a file?
expanding on the use of vim sessions, is there a way to also save dirty state (modified) of files?
Basically i need a way to just save everything as is and restore it later, as i do with some other ...
1
vote
0
answers
146
views
How to resize toolbar in gVim?
The problem is in the picture:
I tried to
:set toolbariconsize=small
But it only changes icon size, but not the toolbar. It is staying huge. How to solve it?
I have fresh Debian 12 + KDE 5.27.5
1
vote
0
answers
469
views
vim auto indenting new lines - how to disable this behavior?
So let's say I have the following code:
if (true) {
// do stuff
// do additional stuff
}
I open up vim in PuTTY and right click to paste the above code into vim and it gets pasted like this:
...
1
vote
0
answers
385
views
Neovim Slow Cursor Blinking
I'm trying to switch from Macvim to Neovim, but running into an issue that I can't figure out. I can't get guicursor to fully work. I say fully work because some of it does, e.g. setting ver25 or ...
1
vote
0
answers
272
views
Running WSL On Windows 11, Trying to Preview Latex Document in Windows Adobe Reader from VIM in WSL
I'm using the WSL Subsystem on Windows and running vim on my WSL.
Currently I'm trying to start a Live Latex Preview with the Adobe Reader in Windows. I'm using the Live Latex Preview Plugin from the ...
1
vote
1
answer
5k
views
Spawning language server with cmd: `lua-language-server`
I've recently transferred from Packer plugin manager to Lazy.
Utilizing LSP, LspConfig, Mason, MasonLspConfig with several language servers for programming.
The problem is that Neovim is having ...
1
vote
0
answers
646
views
How to delete selected text in neovim?
I have xnoremap <BS> "_di this keymap in my neovim config. But when I select a text in visual mode and press backspace to delete the text, the text deletes and gets copied to my clipboard.
...
1
vote
1
answer
29
views
Save file with a generated name from vim command mode
I am trying to save file with a generated name from vim command mode. I am using the command:
:w !tee"/tmp/vim/$(date +'%s').tmp"
But it throws me an error that filename cannot be empty. Am ...
1
vote
0
answers
96
views
Mac OS, How to run an executable that takes input in vim?
In competitive programming, we often have some small input we want to test our C++ program on. I already know of being able to remap some keys to make vim compile and run the executable.
However, I am ...
1
vote
0
answers
293
views
Vim Ex Command History Ctrl-F not working
I used to use Ctrl-F in my personal laptop to successfully get the command history pop-up in ex-mode but in my work PC, that no longer works. It just shows as ^F if I type Ctrl-F.
Vim Version is 7.4....
1
vote
1
answer
52
views
C-S-PageUp and C-S-PageDown keymappings stopped working in vim
I have these lines in my .vimrc which let me quickly move tabs around:
nmap <C-S-PageUp> :-tabmove<CR>
nmap <C-S-PageDown> :+tabmove<CR>
I tested using other commands instead, ...
1
vote
1
answer
1k
views
Change Window Frame Color For Regedit, GVim, and other windows
I have been able to change many of the Window Frame colors to black using the following key:
Computer\HKEY_CURRENT_USER\Control Panel\Colors
and setting:
WindowFrame 1 0 0
However, this does not ...
1
vote
1
answer
225
views
Neovim - gf equivalent but for an adjacent, existing split
My typical workflow involves having a large "main" split, with a smaller split below for a terminal. When I get a stack trace, I'd like to be able to use gf to go to that location in the ...
1
vote
2
answers
6k
views
How can I configure shortcut keys in all modes of vim?
I want to configure a shortcut key that can be used in both edit mode and normal mode, usually two commands are required:
:nnoremap <C-s> :w<cr>
:inoremap <C-s> <esc>:w<cr&...
1
vote
0
answers
300
views
Moving the mouse cursor (not just screen) in vim
With my .vimrc under Linux I can scroll using my mouse wheel and the cursor itself goes up and down, shifting the lines shown on the screen if necessary. Using the same .vimrc and vim installed from ...
1
vote
0
answers
50
views
Is there a way to this unix Vim task in less than 10 keypresses(inlcuding ZZ)? [closed]
Task:
In it your task
is to change the text that gets opened in Vim to the following:
// comments
// yay comments
// so informative, the information is really yes
// wowowowowow
// wel well
// and ...
1
vote
1
answer
640
views
Why does GNU Screen cause me to have to press Esc twice in Vim?
When I launch GNU Screen and then open Vim, to get out of "insert mode", I have to press the Escape key twice, whereas in Vim outside of Screen I only have to press it once.
Why does this ...
1
vote
0
answers
265
views
Is there a way to use RipGrep (or a similar tool) et all to search for a pattern, *but ignore results inside comments?*
I'm a regular user of RipGrep rg, but one thing I can never figure out, and regularly find myself wanting, is to search only in lines that aren't comments.
Unfortunately,
It doesn't look like that's ...
1
vote
0
answers
95
views
How to use advanced vim copy selections methods in TMUX
I'm using vim and tmux and I am interested if there is a way to use something like advanced vim selection methods in tmux.
So for example if I have a text in vim
This is a sentence "and I want to ...
1
vote
1
answer
974
views
YouCompleteMe unavailable: requires Vim compiled with Python (2.7.1+ or 3.4+) support. Press ENTER or type command to continue
I was editing my vimrc but after I had added tabnine (or I don't know is that's the problem), it shows this message every time I open a file with vim. The vim version is 8.1 and I'm on Linux. This is ...
1
vote
0
answers
702
views
Fuzzy finder script to search file contents while floating (i.e. in dmenu/rofi style)
I've been trying to create a script with the following functionality: I push a button in my window manager -> a fuzzy finder menu in floating mode pops up where I can type a keyword to search the ...
1
vote
1
answer
242
views
Open file highlight color changes in Vim when used on a remote server on macOS Big Sur (11.1)
I use the terminal and it has set to ‘Pro’ scheme which has a dark background. When I SSH to a Linux server (CentOS 8.3.2011) and use VIM open a file, the color of the keywords in the file changes ...
1
vote
0
answers
193
views
Missing functions when installing vim to a local directory
I tried to install vim on a local directory by giving the --prefix command when running ./configure. More specifically, this was what I did:
# Installed ncurses locally on $HOME/local/gpu2
cd vim/src
...
1
vote
1
answer
861
views
Mapping Shift+Arrows to select text in tmux with vim
I use vim in linux and have recently started to use tmux too. I use vim with the Windows shortcuts instead of the vim ones, for example; Shift+Arrows for selection instead of HJKL, Shift+Arrows for ...
1
vote
1
answer
737
views
VIM go back (CTRL-O) to already opened tab
When I do gf then file under the cursor is opened in current tab. That's fine. When I do CTRL-W gf file under the cursor is opened in new tab - that's fine, but when I do CTRL-O newly opened tab is ...
1
vote
1
answer
1k
views
Understanding and using \& in vim search-and-replace
I have come across the following specifier for a vim pattern on http://vimregex.com/:
\& -- the next line where the previously used substitute pattern matches
And not quite sure what an ...
1
vote
0
answers
215
views
Windows 7 Showing Rectangle Boxes Instead of Characters! [gVim]
I have been trying to solve this mystery for such a long time. Within Gvim I see all the airline symbols are not showing. Some are like rectangle boxes. It seems MS Word 2016 can show slightly more ...
1
vote
0
answers
92
views
gvim, latex suite, and okular forward search issue
I have a gotten my gvim + vim-latexsuite + okular working well, except for one thing: forward search. I have tried many of the hints on line, but I can't find the solution, but I am close!
So, I ...
1
vote
0
answers
242
views
How do I bind the escape key to something else for the vim keybindings in Rstudio
I usually use jk or kj in vim as the keybinding for escape to enter normal mode. How do I do this for the vim keybinds in Rstudio?
1
vote
1
answer
2k
views
Save vim settings
enter image description here
I spent a bit of time getting my vim the way it looks like in the attached picture. My question, is there a way to get this settings as default when I open my vim? A ...
1
vote
0
answers
75
views
gVim gets shorter on each start with lazyredraw and showtabline=2
In my vimrc, I have the following:
set lazyredraw
set showtabline=2
With both these options set, every time I start gVim, the window is a couple lines shorter than it should be. Even if I use set ...
1
vote
0
answers
66
views
How to install XVim
I'm attempting to install XVim on my MacBook. According to XVim.org, the first step is to checkout XVim, using
git clone [email protected]:XVimProject/XVim.git
in my terminal. But when I put this in ...
1
vote
0
answers
305
views
Why Won't Deleting vimrc Reset Vim Settings? (Mac)
I reinstalled Macvim using Homebrew, deleted and reinstalled both the vim folder at /usr/shared/vim and vimrc.
When I open text files with vim the settings are the same and any changes I make to the ...
1
vote
0
answers
1k
views
Prevent Vim from continuing comments on next line (Cygwin, 2019)
When I make a single line comment (a line starting with a hash mark # in my case, although obviously varies), Vim begins the next line with a hash mark too. I want to stop that.
This is in Cygwin, ...
1
vote
0
answers
189
views
Anaconda3 with jedi-vim, Manjaro linux, ImportError, could not import the 'jedi' Python module
I had this strange error when working with anaconda3 python distribution and jedi-vim plugin. Here is the output from the :JediDebugInfo
#### Jedi-vim debug information
##### jedi-vim version
- ...
1
vote
3
answers
865
views
Vim highlighting trailing white space after certain movements with coloscheme
Problem
After setting a colorscheme in Vim, (following the proscribed method of moving the colorscheme.vim file to ~/.vim/colors), and performing multi-line movements such as Ctrl-D/Ctrl-U for Page ...
1
vote
1
answer
159
views
VIM: `[y`] lost last character?
I met the problem in VIM that `[y`] yanked the text between `[ and `] but lost the last character.
To reproduce:
put the cursor on some word in normal mode.
press yiw
run :echom @@ to see the word ...
1
vote
1
answer
811
views
my WSL ubuntu vi editor screen is broken when I scroll down
When I scroll down at my vim editor, all of my codes is wrapped with strange boxes. Can I fix it?
My .vimrc file:
Problem Image: