Questions tagged [vim]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

VIM: scripted search and replace?

I am switching to Linux and used to have NoteTab Pro, which allowed me to do scripted search and replaces... as I need multiple replace sequences to achieve a certain outcome. I'd like to put these ...
0
votes
1answer
4 views

How can I delete marks in Kile/Kate in vim-mode?

When setting marks in Kile’s/Kate’s vim-mode via m. the line will be highlighted. This can be annoying and the attempt to remove the mark via :delmarks fails with unknown command: “delmarks”. Is it ...
0
votes
1answer
24 views

:n and :N not working when opening files with

Okay so I have already gone through this. So I know you can edit multiple files in VIM if you open them up in the following way: vim file1 file2 and you can change files using :n and :N. But what ...
0
votes
1answer
32 views

How to set “less” and “lesspipe” correctly?

I had set less to a vim less functionality some years ago and I would like to reverse those changes. Therefore I started removing the alias from "~/.zshrc". Since after sourcing this file my system ...
1
vote
0answers
24 views

How can I start a terminal running vim with a input file

I can start a terminal running vim with : open -a Terminal /usr/bin/vim I'm trying to edit a file like: open -a Terminal /usr/bin/vim --args $HOME/.bashrc But --args $HOME/.bashrc has no effect at ...
1
vote
1answer
20 views

Explanations for Ctrl-x Ctrl-d in “insert mode”

Could someone explain to me this combination how it works? (the manual page is not helpful at all!)
0
votes
0answers
33 views

Very high cpu usage in vim

I recently upgraded to Debian 10. I normally have a few dozen instances of vim running in different tmux windows. Now, when trying to do this in Debian 10, when restoring my session in tmux, I see ...
0
votes
1answer
23 views

Manage manually compiled ViM (Debian)

I installed ViM by compiling the source code from GitHub and then I used checkinstall to install it on my system. Now I'd like to install another program with the apt package manager (which is vifm), ...
0
votes
1answer
19 views

VIM difference beetwen ] and . (Marks)

What is the difference between ] and . in marks? I can't understand the difference. I noticed that if I enter insert mode (without inserting anything) and go out, the line in question appears in the ...
0
votes
0answers
33 views

List of MARKS. Duplicate lines

The numbered marks, are used for trace history of the cursor position in the last closed session vim...and ok. therefore: 0 contain last position of the cursor before close VIM, 1 contain the ...
0
votes
1answer
30 views

Conflict Ctrl-I with TAB in normal mode

I recently noticed that in normal mode when I type Ctrl-i (command for jumps) it is "confused" for the TAB key. In particular, I have this mapping: nnoremap <Tab> :tabnext<Enter>
1
vote
0answers
47 views

vim inside tmux not rendering proper characters

I'm trying to run vim inside local tmux session. Vim on its own (both via terminal, and via gui with gvim) is working as expected. I'm running Debian stable, tmux 2.8, vim 8.1.549, urxvt 9.22. The ...
0
votes
0answers
36 views

VIM - do not delay mapped keys with common prefix

What I want to do is have two mappings. One mapped to <s-k>, and one mapped to <s-k><s-k>. What happens right now is that if I press <s-k> vim delays for timeoutlenms, and if ...
1
vote
1answer
39 views

Weird characters sent to ssh terminal when Alt+Tab between apps

I ssh to my AWS EC2 machine with Amazon Linux from local Ubuntu with GNOME Terminal. If open vim in the ssh session and then Alt+Tab from terminal to another app and then Alt+Tab back, annoying ...
0
votes
1answer
30 views

Vim cursor change on specific events

I've tried VsVim recently. One nice thing I noticed is when c or d is entered the cursor shape changes to half-underscore. And after deleting the line with dd cursor shape restores to block. Is it ...
1
vote
1answer
75 views

Enable copy/paste in vim on bare Linux

I'm using vim on Linux Debian without desktop environment (i.e xorg, i3, urxvt). I'm not unable to copy and paste ("+, "* not work), because clipboard package is not installed: └> vim --version | ...
-1
votes
1answer
53 views

Create new window vertical with shortcuts in vim?

How can I create new window with new buffer in vim, vertical with shortcuts? (Similar to Ctrl-w n, but vertically.)
0
votes
1answer
38 views

Vim search and replace positional arguments

I am trying to replace positional arguments with variables in my bash script using Vim's substitute :scommand. Example: I would like to replace the following text in a bash script: python3 mymodule....
1
vote
2answers
50 views

Is there a .vimrc setting that will cause vim to open files at the first line?

I'd like vim to automatically open files at line 1 instead of where it left off the last time. I tried putting gg in .vimrc, but that didn't work. There's must be some way to do this.
1
vote
0answers
14 views

map “j” another character (specifically to a non-latin1, utf-8 character)

I am using a non us keyboard layout. I would like to map "j" to Turkish "ü" character, but also "k" to "j" since it is more convenient and natural for me. (I know this may be bad in the long run etc.,...
1
vote
1answer
21 views

Vim search and replace html tags reusing hits

I want to replace html tags in vim but reuse what I found. Namely I want to replace <div class="subSectionTitle"> Title 1 </div> with <h1> Title 1 <h1> I tried to ...
1
vote
1answer
24 views

Correct way to copy text from a file opened in Vim in one terminal into another opened file using VIM in another terminal?

I was able to do this the other day but now it does not want to work. Basically, to copy text from a file that I opened using VIM from one terminal into another file opened in a separate terminal, I ...
1
vote
2answers
106 views

Invoking external editor from Vi command line editing mode in zsh

For some reason, I can't get the keybinding to invoke Vim (my editor) to work with Esc+v zsh when using iTerm. I've gone back to a minimalist .zshrc file, to ensure it's not a plugin issue: # If ...
1
vote
1answer
42 views

VIM show actual and relative line numbers at the same time

Per default I have the relative numbers and actual numbers active on my vim sessions. However I find myself switching quite often to the actual line numbers as I like to copy elements from a certain ...
2
votes
1answer
31 views

Ctrl-Backspace in vim broken after upgrade

Under FreeBSD’s xterm the following setting made vim delete the last word after pressing ctrl+← (“Control+Backspace”): set backspace=indent,eol,start inoremap <C-?> <C-W> cnoremap <C-?&...
0
votes
1answer
51 views

PYTHONPATH not being updated

Currently I use pyenv to have a particular python version installed. Then I use pipenv to create virtual environments for my various projects in python. Currently I have a project structure similar ...
2
votes
1answer
25 views

How to search current word in elvis editor?

How to search current word in elvis editor? just like * and # in vim. In slackware vi is elvis.
0
votes
1answer
30 views

Script to remove all modules in pom.xml except the one with the highest number

Question I have a huge pom.xml from a Talend DI/ESB project, where it was possible to have multiple lines for the same module with different Talend specific versions (don't even ask for that :-( ) ...
2
votes
1answer
62 views

Make GNOME Terminal send correct numeric keypad keycodes to vim

I use the vim-mark plugin, which allows me to make multiple highlights of different colours. It has some default key maps that uses the numeric keypad (<k1> ... <k9> and <C-k1> ... &...
0
votes
0answers
28 views

Bashrc not loading when running manpager

I have found issues with using the MANPAGER variable in bash in order to set vim to be my manpager. Initially I set my manpager using the method shown in :help manpager by doing: export MANPAGER="...
1
vote
1answer
247 views

Disabling vim visual mode in /etc/vim/vimrc does not work

I found plenty of questions regarding disabling visual mode in vim but none that tackles my particular problem: I added set mouse-=a to my /etc/vim/vimrc file to disable visual mode for good. Thing ...
2
votes
1answer
28 views

How to source a file that has set of vim search and replace commands in vim interactively?

I have a file (FileA) opened in Vim to edit. I have one another file (FileCommands) that has some set of vim search and replace commands. I am looking to load that FileCommands file, to do that ...
0
votes
3answers
78 views

How to open vim inside a bash script?

Hey how can I open vim inside a script? I need to grade coding assignments and wrote a script to open code and note files, but vim does not open. The script is essentially a fancier version of this: ...
0
votes
1answer
165 views

How to run aliases commands in inside the vim editor? [closed]

In .bashrc file set alias alias l='ls -l' Inside Vim: :! l [No write since last change] /bin/bash: l: command not found shell returned 127
0
votes
1answer
29 views

Tmux: create pane if I'm not in edge

I want to create some same function like Nick Nisi's window management in vim (if I'm in the edge, create a new window(in vim)/pane, otherwise just move). I don't know how to check, if I'm in the ...
0
votes
0answers
50 views

vim color is not showing on urxvt

I set vim color colorscheme solarized8_dark_low set t_Co=256 but vim showing bgcolor of urxvt when I open vim on urxvt.vim and urxvt side by side
0
votes
1answer
39 views

Changing a specific character in a line

Input Every line is separated into 8 parts by semicolons Every part can include words,numbers,space etc. Output I am trying to replace the space in the 6th part with a semicolon, thus separating ...
13
votes
1answer
1k views

How to make a continuous vertical line in vim?

I want to make a table in vim. Making a horizontal line is easy ______________________________ For the vertical I use this yes "|" | head -10 But the result is bad | | | | | | | | | I want ...
1
vote
1answer
60 views

Can you run vim (or another editor) in two shells at once on a single file, in a coordinated way?

I am interested in having a single file open with vim in two shells at once. The use case I have in mind is two windows of gnu screen running on a tty. The catch is that I would like the instances of ...
0
votes
0answers
24 views

How do I vimdiff a current version of a file to a previous version in CVS?

At the moment, I am able to use the command cvsvimdiff filename to compare my local modified file to the version found in the repo in a nice splitscreen view that highlights all the difference that ...
-4
votes
1answer
37 views

Search for lines that do not have certain characters in a row

I have a news article which I need to edit up a bit. Basically, I need to search for all lines that do not contain characters t and h 2 or more times in a row and replace 4 letter words with character ...
1
vote
0answers
65 views

How to enable text color in vim? [duplicate]

I have a file that I report to daily using shell script. There are also colored texts in this report. Normally, when the file is executed, color text is displayed, but when the result is saved to a ...
6
votes
2answers
187 views

SSHFS/SFTP : Vim hangs when trying to edit file over sshfs and can't upload file over MTU size over sftp

My university provides an ssh access to the students university accounts, and I just set up an sshfs to access some folders on my remote account. I am running pop_os on my local machine and using ...
1
vote
1answer
69 views

How can I change multiple filenames simultaneously in Vim?

I have a season of a show downloaded and every episode filename ends with information about the video ([1080p], [Dual Audio], etc). I would like to use Ctrl-V to simply rename all of the files at once,...
1
vote
1answer
42 views

How do I yank, delete, and paste a group of lines without moving the cursor?

Let's say I'm on line 25, and I want to grab lines 15-17, delete them, and paste them on my current line. Can I do that in a single command? I'm aware of things like this (and other similar combos): ...
3
votes
1answer
532 views

Vim freezes after Ctrl-S [duplicate]

I have been using neovim for a long time and I have been using Ctrl + s to save and Ctrl + q to quit. nmap <c-s> :w<CR> imap <c-s> <Esc>:w<CR>a nmap <c-q> :q<...
0
votes
2answers
136 views

vim - replace multiple words with yanked text, multiple times

In the text below, if I want to replace book1 and book2 with pen I could yark pen and go to the beginning of the 2 and 3 lines and hit . (dot) to replace the words. pen; book1; book2; book3; but, ...
0
votes
2answers
46 views

Search and Modify strings with Vim

I wish to find lines containing a digit string only and modify each match by putting it in between a pair of square brackets ([..]) in Vim. e.g. Original text 10001 hostname1 hostname2 10002 ...
2
votes
2answers
60 views

vi - finding a pattern in lines and add “;” at the end of those lines

I want to add ; in the end of lines in a txt file containing ddl for multiple tables. For example : LOCATION: 'hdfs://HDP**/apps/hive/warehouse/bps_uat.db/maaa' As per above, I need to add ; in ...
0
votes
0answers
37 views

Auto-completing bash command options in vim

When I am writing shell scripts inside of vim, I often myself looking at manpages for the command options the script will use. Is there any way to retrieve the auto-complete wordlist for a command ...

1 2 3 4 5 31