Questions tagged [vim]

vim (Vi IMproved) is a text editor supporting different editing modes.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

tmux doesn't instantly update pane's title [closed]

I'd like to have tmux "instantly" update the pane's title to match what is currently being executed in the terminal. For an instance: If the pane contains the shell then its title should be ...
notopython's user avatar
1 vote
1 answer
25 views

Fontawesome icons are not pasted correctly

I am using Fedora and installed fontawesome via sudo dnf install fontawesome fonts. Later because it didn't work I also additionally installed the font manually via downloading the zip from the Github ...
Sinthoras's user avatar
0 votes
2 answers
30 views

E325 Error with permission denied while deleting

I have this message on Linux Mint: 325: ATTENTION Found a swap file by the name "/etc/default/.grub.swp" owned by: root dated: Fri Mar 29 17:37:00 2024 file name: /etc/...
PaiThon's user avatar
  • 15
12 votes
1 answer
3k views

Why does typing 'q' exit vim? (.man file)

When I type the character q on my keyboard in vim, it exits vim. Why? Today I tried it edit a file with the file extension .man. I wanted to edit the file with a macro, so I tried to type qq -- but ...
Michael Altfield's user avatar
0 votes
0 answers
195 views

How to enable <Ctrl+Backspace> with Tmux, Neovim and Alacritty to delete the previous word?

I use the alacritty terminal, and neovim editor with tmux. At first Ctrl+Backspace (for deleting a previous) wasn't working at all in the terminal. So added the following line to alacritty.yml: ...
an4s911's user avatar
  • 131
1 vote
1 answer
177 views

Vim enable Ctrl+Shift+C

So...I'm using Vim (in the terminal, not any sort of other gui; whenever Vim is used by itself, assume it's terminal vim). Vim is decent, I actually don't find the learning curve to be too bad. I'm a ...
user2624583's user avatar
0 votes
1 answer
50 views

Vim does not display other files in the same folder when opening a file

On a brand new debian installation, when no ~/.vimrc is present, vim shows all files in the current directory when trying to open another file for editing in normal/command mode, as shown below: ...
Adama's user avatar
  • 103
4 votes
2 answers
774 views

Can a file be closed in vim without exiting?

I have a file open in vim, and I have finished my edits. Is there a way for me to close the file (or buffer) so that the vim screen is blank?
Seamus's user avatar
  • 2,959
0 votes
0 answers
30 views

How to diff command outputs in vim

I tried vim -d <(ffprobe one.mp4 2>&1) <(ffprobe two.mp4 2>&1) to see the difference between the two videos' codecs etc., but vim doesn't show anything when it opens, just an empty ...
minseong's user avatar
  • 817
1 vote
2 answers
26 views

Disable $keyword$ expansion by RCS ci check in?

For better or worse, I am using rcs to track changes to HTML and JSON files exported from chatGPT. Some of these contain chats with embedded $keyword$'s. These get expanded on ci check in. How do I ...
Steve Dutky's user avatar
0 votes
1 answer
48 views

What's overriding my .vimrc tabstop size setting for CMake files?

In my ~/.vim/vimrc, I have: set shiftwidth=4 set tabstop=4 and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried looking for the ...
einpoklum's user avatar
  • 9,525
0 votes
1 answer
53 views

Vim Colour Theme Problem

My goal "was" to set the text-width persistently to 72. I seem to be only able to achieve this by creating a custom .vimrc file. However when I did that, I immediately ran into a colour ...
john smith's user avatar
0 votes
1 answer
56 views

yamlfix not using configuration + (neo)vim usage

I'm using yamlfix with ale in vim. I followed these steps because I wanted to remove the automatic "---" adding on top of the file every time I save my work (and some others default ...
Corentin Michel's user avatar
0 votes
1 answer
40 views

Vim keeps resetting textwidth to 0, why?

I am trying to understand why VIM keeps resetting my textwidth to 0. To create the problem, I open a new file in Vim, and I type: :set textwidth=72 I then enter a sentenace or two and I can see that ...
john smith's user avatar
-1 votes
1 answer
76 views

Mouse events not working in Vim on Debian?

If I click on a line, I can see "19m" or "18m" etc. show up in the bottom right of the screen. If I scroll, nothing happens, but shift+click&drag works. set encoding=utf8 ...
John P's user avatar
  • 65
0 votes
2 answers
77 views

Highlight for two strings simultaneously in vi or less editor?

https://stackoverflow.com/questions/41901319/how-to-search-for-multiple-strings-in-a-log-file-using-less-command-in-unix I found this. awk '/pattern1/ && /pattern2/ && /pattern3/' file....
barnyard9's user avatar
  • 157
1 vote
0 answers
105 views

I feel like my :colorscheme is not displayed correctly. There is so much terminology involved. What are vim color modes?

I have a feeling that the :colorschemes I'm using in Vim are not displayed properly. That the colors are corrupted. I think this because I have 3 virtual machines rented from 3 different vendors, two ...
michal roesler's user avatar
1 vote
0 answers
60 views

How to configure coc and nvim to sort react imports correcty?

I use nvim daily in conjunction with coc and it has been extremely more efficient than VS code, however, something that is done in vscode and I can't configure for when I use React is the import in ...
Hudson Ribeiro's user avatar
2 votes
1 answer
72 views

Vim intercepts ssh escape

There is no issues to solve (that I know of). I am trying to better understand ssh. On my system the ssh escape character is tilde (~). If I ssh somewhere I can use it as expected: me@local$ ssh ...
kill -9's user avatar
  • 23
1 vote
1 answer
254 views

.vimrc file not working

I have the following short and simple .vimrc file that I've started as I begin to learn and write my own .vimrc: 1 set number 2 3 highlight GoComment xtermfg=blue 4 5 syntax on However, ...
Mathew's user avatar
  • 235
1 vote
0 answers
43 views

Vim. Close the quicklist and return to the original window

I'd like to write a function that toggles the quicklist and when closing it, it returns to the window it was in before the quicklist opening. I tried to improve some function I found but it does not ...
MG5's user avatar
  • 11
0 votes
1 answer
36 views

Using vim, how do I fix word wrapping with leading comment markers like #

How do I fix the word wrapping in the following text, so that the comment # characters are also fixed up? Given this: # This is documentation # that # is very helpful. Lorem ipsum dolor sit amet, ...
Sonia Hamilton's user avatar
1 vote
2 answers
298 views

How can I automatically wrap every command in Zsh/Bash with a custom command before execution?

I'm trying to modify the behaviour of the Zsh (or Bash) shell to automatically prepend a custom command, named myapp for example, to all input before it's executed. Essentially, I want to intercept ...
nextloop's user avatar
  • 166
0 votes
1 answer
194 views

tying together the 'xxd' command with output

I have the following hex dump: 00000000: 2345 5854 5241 530a 0a31 2e20 746f 2061 #EXTRAS..1. to a 00000010: 6464 2075 7365 723a 2060 7375 646f 2075 dd user: `sudo u 00000020: 7365 7261 6464 205b ...
Mathew's user avatar
  • 235
0 votes
3 answers
157 views

open man (or info) pages from the same position where you left off last time

I treat man pages is the primary source of documentation about installed software. I would like to use them not only as a reference, but actually read them from beginning to end. And here comes the ...
Sergey Guzenkov's user avatar
0 votes
0 answers
16 views

vim remove pattern not working [duplicate]

I'm trying to remove all occurrences of '[01;34m' from the following file: Script started on 2023-09-16 10:06:45-04:00 [TERM="xterm-256color" TTY="/dev/pts/1" COLUMNS="204&...
Mathew's user avatar
  • 235
0 votes
0 answers
15 views

vim replace all characters in one cmd [duplicate]

I'm trying to remove the following special characters: ^M, ^[, ^G from the script: Script started on 2023-09-16 08:49:25-04:00 [TERM="xterm-256color" TTY="/dev/pts/1" COLUMNS="...
Mathew's user avatar
  • 235
1 vote
1 answer
88 views

In vim: stop SHIFT+SPACE from discarding all unsaved changes

Every time I type Shift+Space in vim, it undoes all changes to the file that have not yet been written. I would like this to not happen, as it is extremely easy to press Shift+Space by accident. I am ...
Peter's user avatar
  • 11
-1 votes
2 answers
122 views

How to force write (`:w!`) and quit (`:q`) vim in the same command? [duplicate]

How can I force write (:w!) and quit (:q) vim in the same command? I try :w!q but that doesn't work.
a06e's user avatar
  • 1,737
0 votes
1 answer
95 views

How does vim catch mouse scroll events?

I am writing a text editor. With 1049 (alternate screen) mode + 1000 (mouse tracking) mode enabled, the terminal is able to catch both mouse scroll events and click events. I do not need the click ...
user129393192's user avatar
0 votes
1 answer
92 views

Calling vim in subprocess after running cat

I am trying to create a bash function vim_run which operates as follows: user pipes command output into vim_run user can edit output user exits vim and the contents of that buffer are now executed ...
zbs's user avatar
  • 3
0 votes
1 answer
95 views

jump back into vim directory browser after closing a file

vim is able to open directories (and then browse in them). vim roles/webservices/tasks/ " ============================================================================ " Netrw Directory ...
vrms's user avatar
  • 139
2 votes
0 answers
44 views

How do I get the man page for a sub command using vim?

For example, I get the manpage for a command using 'K': docker run +------------ cursor is on d # if I press 'ESC-SHIFT-K', I'll get a manpage for docker Now, if I want to get the manpage for docker ...
Chris's user avatar
  • 971
1 vote
0 answers
2k views

How can install vim on the new debian12 version?

Version conflict when to install vim on my debian12: sudo apt install vim Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be ...
showkey's user avatar
  • 333
0 votes
1 answer
156 views

In vim, how do I prevent pasting on top of visually selected text from erasing the contents of the clipboard?

In Vim, if I have a file like this: one two I visually select "one" by using ve and then yank it by using y, it gets copied to the default register (referred to as the "clipboard")...
redacted's user avatar
0 votes
1 answer
297 views

"E492: Not an editor command: PlugInstall" only when I "sudo vim"

My question is a spinoff from this previous question 6 months ago, so to get more details and see how I've installed Vim Plug have a look here. Currently I wanted to add this extension. https://github....
michal roesler's user avatar
0 votes
0 answers
28 views

Is saving a terminal vim split session possible?

I'm new to vim I only know how to navigate and save sessions with :mksession so far but I'm unsure of how I could save my splits though this is what my settup looks like, https://imgur.com/a/2BGkbSP ...
DudlyDog's user avatar
0 votes
0 answers
50 views

piping text file contents with unsaved modifications to a command with the neovim interactive terminal emulator

I want to know if theres an equivalent to :w !cmd for the nvim terminal emulator. Like :te cat % | cmd is almost there but you would have to save the file before using it. Is there another way? Like ...
teo's user avatar
  • 1
0 votes
1 answer
304 views

Map <C-S-A-hjkl> to Arrow Keys with XKB Map

I'm trying to also have access to my arrow keys from the default Vim hjkl. Since CtrlShiftAlt seems to be a rare key combo, I was thinking about using that. How would I do that using setxkbmap (or ...
psygo's user avatar
  • 201
2 votes
1 answer
128 views

How to make bash keyboard editing default to vi from emacs?

I know how to set the keyboard editing in bash to vi (set -o vi), and probably I could do it in bashrc. But I use bash in a variety accounts and contexts and want it to just default to vi over emacs ...
kmand's user avatar
  • 101
0 votes
1 answer
67 views

Do I need to recompile Vim if Python changes a minor version?

I use a compiled Vim on my machine. This compiled vim attempts to load the shared libary libpython3.10.so.1.0 I just updated my system and apparently Python deleted the old Python 3.10 libaries and ...
Tyler Durden's user avatar
  • 5,661
0 votes
1 answer
27 views

Is it possible to make diff suggestions in vimdiff?

I'm comparing two files in vimdiff. For one section of the code in the first file, the same section in the second file has several lines of code added, and then a slightly modified copy of the section ...
wile_e8's user avatar
  • 111
1 vote
2 answers
240 views

Issue with weird visible right and bottom Borders inside Terminal programs

For quite some time I'm "struggling" with the problem I wish to present in pictures down below. The problem is that I have weird borders around programs I open in the Terminal Emulator. ...
Noa's user avatar
  • 19
0 votes
0 answers
342 views

Fixing the Gtk-WARNING "Unable to locate theme engine" on CentOS 7 when using gvim

On CentOS 7, this is the below warning when I open any file using gvim: (gvim:48476): Gtk-WARNING **: 14:51:18.971: Unable to locate theme engine in module_path: "hcengine",
flash 's user avatar
0 votes
1 answer
79 views

How to make vim cursor to be in central line always?

I want to make my vim to behave in such a way as after each command there is a trailing zz command.
Eimrine's user avatar
  • 23
1 vote
1 answer
45 views

How to move Vim's -- INSERT -- to another place of monitor

I have an annoyance with Vim on my laptop - I can not see -- INSERT -- line of my Vim installation because of my hands of the laptop keyboard. I want to see this word in the top line of my text ...
Eimrine's user avatar
  • 23
1 vote
1 answer
344 views

use vim navigation and search commands in tmux terminal view mode

Is there a way to use vim in tmux terminal output? For example, I want to use 500j to move 500 lines up instead of manually scrolling in vim using Ctrl+a +[
Origami's user avatar
  • 21
0 votes
1 answer
183 views

How to pipe output of tmux pane to vim/neovim?

I have neovim open in one pane, and I have ipython open in another pane. I have set up keymappings which allow me to send keys or to paste my buffer in my ipython pane without leaving neovim. I'm ...
Al-Baraa El-Hag's user avatar
2 votes
1 answer
267 views

YANKING in Vim and Bash - are they opposite?

I have a very short question that I couldn't really find anywhere else upon googling, though to me this feels like a very natural question to ask, so maybe it's just I'm missing out on something. So ...
jshji's user avatar
  • 143
2 votes
1 answer
129 views

Why does sudo change HOME directory to /root on some Linux distros but not others?

In troubleshooting vi, I noticed on my Ubuntu installation running the command sudo env | grep HOME returns the home directory of the user that runs the command (/home/USER). But I noticed on my Linux ...
geckels1's user avatar
  • 133

1
2 3 4 5
38