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,715
questions
0
votes
0
answers
34
views
Vim/Nvim Remote Editing
I want to work from my local nvim client on a project on a remote machine. My job requires that I don't store any source code on my local machine and only work on remote (I think writes to /tmp are ...
0
votes
0
answers
19
views
Encoding issues over SSH characters shown as ~@~X in vim
I am having issues when viewing a file through SSH
I have 2 computers connected to each other myServer 'myHost' , sharing over 'SSH' a session.
On myServer I have got a log from wget which originates ...
1
vote
0
answers
25
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 ...
0
votes
0
answers
45
views
How do scroll up with a number of lines at a time with tmux?
I have my tmux set up for scrolling using vim shortcuts. I can go up a page at a time.
However, I am faced with a very long test failure log. I went up once with Ctrl+U multiple times and realized ...
0
votes
0
answers
19
views
MacVim doesn't open a window (except from Terminal, and then only one window)
If I start MacVim from the dock, it launches, but it doesn't have an open window. File / New Window and File / New Clean Window are grayed out (and of course don't do anything).
If I start MacVim from ...
1
vote
0
answers
69
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 ...
0
votes
0
answers
19
views
I am trying map right to end in my .obsidian.vimrc
I am trying to remap right in normal mode in my .obsidian.vimrc to jump to the end of a line.
Things I have tried
nmap <RIGHT> <END>
I did not use $ as I wanted it to jump to the end of ...
0
votes
0
answers
18
views
Esc fails on vim via ssh through git bash
I am a heavy user of vim and, by extension, the Esc key.
Today, for the first time, I've noticed that it sometimes sends a literal [ to the screen instead of changing to command mode as it should. ...
0
votes
0
answers
16
views
How to break a paragraph with footnotes via \autocite{} into sentences in nVim?
This question is similar to the one asked here.
I'm trying to figure out how to break paragraphs written in a TeX file in Nvim so that:
any sentences with a citation (i.e. \autocite[][]{}) after them ...
1
vote
0
answers
18
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 ...
2
votes
1
answer
79
views
VIM uses wrong encoding - but only in status messages
I ran into a strange issue with my ArchLinux setup. Vim uses correct encoding for reading/displaying files but these status messages (which displays the current mode or reports back when the buffer is ...
0
votes
1
answer
108
views
vim 9 ignoring stuff on `/usr/share/vim/vim90/`
After an upgrade from Fedora 38 to 39, vim ignores its main runtime directory at /usr/share/vim/vim90/.
Even the simplest :help command fails with E149: Sorry, no help for help.txt, as its contents is ...
0
votes
1
answer
287
views
How do I copy text from vim on a remote host in Terminal, to local MacOS clipboard?
I've googled the heck out of this but nothing I try solves the problem. Help?
Context
I'm running vim on a remote linux machine, which I ssh to in Terminal.app.
I have root on the remote machine, so ...
2
votes
2
answers
103
views
Replace Template String with Current Date and Time in Vim
I have a template file with the following string:
{{date}} {{time24}} Some text.
I want to replace {{date}} {{time}} with the current date and time on a keymap.
I currently have:
:nnoremap <leader&...
0
votes
0
answers
25
views
I can't start vim in conemu
I'm trying to start vim in conemu.
If I add to the tasks just
vim.exe
It starts vim, but it is in black and white, and it is super super unbelievably slow.
I've tried most of the commands but the ...
2
votes
0
answers
101
views
Can I map Fn-h, Fn-j, Fn-k, and Fn-l to the arrow keys?
Anybody who uses vim would understand the motivation immediately.
By "Fn", I am referring to the key on laptops that switches between F1, F2, etc. and volume up, volume down etc.
This would ...
0
votes
0
answers
210
views
Run neovim as an external application in Linux
I want to run neovim as an external separate program. I created a desktop file like this:
[Desktop Entry]
Name=Neovim
Comment=Run nvim in konsole with customize options
Keywords=Text;Editor;Plaintext;...
1
vote
1
answer
73
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
126
views
How do I set a version of vim as default?
I am running Ubuntu and have the current situation. The version of vim that opens a file in the terminal has +clipboard enabled. The version that opens a file in a new terminal window when I open it ...
1
vote
1
answer
180
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 ...
0
votes
1
answer
21
views
vim under gnu-screen can't take shift-left/shift-right keymap properly
I recently started using gnu-screen.
In vimrc, I have 2 keymaps as below to help easy navigation between vim split windows
nmap <S-Left> <C-w><Left>
nmap <S-Right> <C-w>&...
1
vote
0
answers
60
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
132
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
0
votes
0
answers
77
views
Why doesn't this bash/diff command work through Neovim?
I am using WSL bash (Ubuntu distribution).
From Windows command line, this works as expected:
bash -c 'diff test.txt -'
However when running the following through Neovim:
:w !bash -c 'diff % -'
This ...
0
votes
1
answer
291
views
NeoVim: Switch between sets of open tabs, depending on git branch
When working on multiple different branches in a git repo, I have found myself to want different sets of files opened in different tabs. Is there any plugin or way to essentially "save" the ...
1
vote
1
answer
607
views
Getting python3-config path right for vim install
I am trying to install vim from source in Ubtuntu 20.04, with both python3 support, and with clipboard support. For that, I am using the instructions presented in the plugin site, particularly, the ...
1
vote
0
answers
414
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:
...
0
votes
1
answer
34
views
How do I get let &showbreak=' ' (two spaces between ticks) to work on modeline?
I've tried every which way to sunday to make this work but nothing I do seems to work.
I know I can't use let on modeline. This is what I'm currently using without showbreak in my modeline to wrap the ...
1
vote
3
answers
245
views
Disable settings for files without extensions
I want to disable certain settings (like line numbers) when vim opens files that don't have an extension.
I have set number in my .vimrc, and I know that I could disable this for example for markdown ...
0
votes
2
answers
198
views
Copying a filename on the same line to the end of the line
I have the following lines in VIM:
<img src="file01.jpg" / >
<img src="file02.jpg" / >
<img src="file03.jpg" / >
And I would like to add the filename ...
0
votes
1
answer
538
views
Why neo vim is displaying $ at the very end of line and > at the beginnings of line
Why neovim is displaying these special characters at the beginning and at the end of line?
I have uninstalled and reinstall neovim but this didn't fixed the issue.
How can I fix it?
1
vote
2
answers
2k
views
In [Neo]Vim, how do I display error messages from an external command used as a filter on the visual selection?
Summary
In [Neo]Vim, if I call an external command on the current visual selection (expecting that command to transform the selected text, which Vim then updates in the buffer), and the command fails ...
2
votes
1
answer
261
views
How do I override a syntax's comment character in a modeline, in vim?
I have a weird assembler which uses \ as a comment character. The standard vim asm syntax uses # as a comment character instead, which is bad because it's both wrong and # is an instruction delimiter ...
1
vote
0
answers
361
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 ...
0
votes
0
answers
439
views
How can I make the cursor in VS Code use the arrow keys in the same way as vim?
Specifically, I want it in VS Code so that when I move the arrow key to the right at the end of a line of text it just stops in place instead of jumping to the beginning of the next line. I find this ...
2
votes
0
answers
715
views
Easiest way to switch NeoVim Control key shortcuts to command key
tl;dr
Searching for a way to replace all shortcuts in neovim that use the control key with the command key on Mac
--
I just got started in using neovim as my main code editor
However I find hitting ...
0
votes
0
answers
146
views
vim colorscheme issue on redhat
I have set my colorscheme to desert in my redhat 6 .vimrc. In redhat 6, when I open vi any file, it is displayed using the colorscheme.
There is a redhat 8 machine that I can ssh to and when I do, my ...
0
votes
0
answers
186
views
How to copy across terminals using text editor vim without clipboard support?
options in my version of vim :
vim --version | grep clip
-clipboard +jumplist +popupwin +user_commands
+ex_extra -mouse_jsbterm -sun_workshop -...
0
votes
1
answer
1k
views
Why can't I edit the sudoers.d files with vim but I can with nano
I tried editing a file in the sudoers.d directory using vi in a vagrant box (Ubuntu Trusty64) but it just opens the file in readonly mode but when I use the nano editor it works.
The command sudo vi /...
0
votes
1
answer
138
views
vim is ignoring configurations
Vim is just not applying some configuration statements. This behaivior started after I installed a plugin to it, and updated MacOS (that shouldn't be related to each other !?).
One example is ...
0
votes
0
answers
79
views
Why does not PRIMARY buffer work in VIM sometimes?
I edited /var/log/cups/error_log with VIM and, as I usually do when I have to copy from VIM and paste at some place else, I used the PRIMARY buffer. So far it never failed; but this time it did not ...
1
vote
1
answer
2k
views
"Pattern not found" message on found and highlighted pattern in vim
I have a fair number of PHP classes source files that I can list using the command grep -r "class " * with each file containing the class <MyClass> pattern.
For example, one such file ...
0
votes
1
answer
163
views
YCM on windows vim can't find python
I would like to be able to use YouCompleteMe plugin on vim (on windows).
I have installed vundle, and followed the installation guide for YCM on Windows. When I run :PluginInstall I see:
Traceback (...
0
votes
0
answers
285
views
Install vim plugin python-syntax on macOS without third party package manager
I would like to install the vim package python-syntax. The README says to use a package manager but it must be possible using vim's builtin package capability. I cloned the package using
git clone ...
0
votes
0
answers
492
views
How do I detect nul (0x00) characters in a vim string or register?
I have a vim register that contains a string. I need to step through each character in the string, and process each one individually.
My problem is that given a character pulled from the string, I am ...
1
vote
1
answer
47
views
How do I correctly execute 'vim $(grep -rli pattern | sed 's/\(.*\)/"&"/')' in bash?
I am trying to edit files that contain text matching a regular expression with vim and use the following command in bash to do that:
vim $(grep -rli pattern | sed 's/\(.*\)/"&"/')
I ...
1
vote
0
answers
255
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 ...
0
votes
1
answer
4k
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 ...
0
votes
2
answers
375
views
How to copy output from a zsh terminal using vi movements(or if that's not possible any other way)?
Currently I am using vi motions in zsh and it is incredible. I work on terminal a lot and it is annoying to switch back to move to copy an output. Is there a way to use vi motions or anything else to ...
0
votes
1
answer
86
views
vim split next file on command line
I often run vim on multiple files eg vim *.cc
sometimes I'm halfway through the list and I'd like to keep editing the current file and then split the window (sometimes vert and sometimes horiz) to the ...