Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

8 votes
2 answers
2603 views
In Bash Vi mode, I get thrown into Insert mode automatically after one key press
I am using the bash shell with the XFCE4 terminal. I have configured the shell so that it is in Vi mode. I have done this by adding the following line in my ~/.bashrc file: set -o vi When in a shell in Normal Mode, the first character I press gets inputed in Normal Mode but then I get thrown in Inse...
I am using the bash shell with the XFCE4 terminal. I have configured the shell so that it is in Vi mode. I have done this by adding the following line in my ~/.bashrc file: set -o vi When in a shell in Normal Mode, the first character I press gets inputed in Normal Mode but then I get thrown in Insert Mode. ie: I am in Normal Mode. If I press b, I will go back one word and get dropped in Insert Mode. If I press bb, I will have got back one word, enter Insert Mode and then insert the b character. Another example, if I press dd, the first d will be caught by Normal Mode, I will then go to Insert Mode where the second d will be inserted. If I manually enter set -o vi in the shell (whether it is in my .bashrc or not) I will not get this behaviour and instead get the normal behaviour. I know the change in my .bashrc is getting read as I am not in Emacs mode. I am using bash 4.2.45(1)-release. Here is the full content of my .bashrc: PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting PATH=$PATH:/home/bleakcabal/.rvm/gems/ruby-2.0.0-p247/bin set -o vi
Gilles (439 rep)
Sep 6, 2013, 01:52 AM • Last activity: Jul 26, 2025, 04:18 PM
80 votes
5 answers
55057 views
less command and syntax highlighting
I need to use the `less` command with the syntax highlighting of the vim command for `python`, `C`, `bash` and other languages. How do I apply syntax highlighting colors according to `vim` colors for `less` command?
I need to use the less command with the syntax highlighting of the vim command for python, C, bash and other languages. How do I apply syntax highlighting colors according to vim colors for less command?
PersianGulf (11308 rep)
Sep 17, 2013, 06:17 AM • Last activity: May 29, 2025, 02:29 PM
5 votes
1 answers
1174 views
Why RHEL has two vim installed by default?
I'm on a RHEL 8.3 system. I found that the built-in `vim` and `vi` are all `vim`. They have the same version, but compiled differently. Below is my testing: ``` [root@192 ~]# which vim /usr/bin/vim [root@192 ~]# which vi /usr/bin/vi [root@192 ~]# ls -lah `which vim` -rwxr-xr-x. 1 root root 3.0M Jun...
I'm on a RHEL 8.3 system. I found that the built-in vim and vi are all vim. They have the same version, but compiled differently. Below is my testing:
[root@192 ~]# which vim
/usr/bin/vim
[root@192 ~]# which vi
/usr/bin/vi
[root@192 ~]# ls -lah which vim
-rwxr-xr-x. 1 root root 3.0M Jun  3  2020 /usr/bin/vim
[root@192 ~]# ls -lah which vi
-rwxr-xr-x. 1 root root 1.2M Jun  3  2020 /usr/bin/vi
[root@192 ~]# vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  3 2020 09:07:54)
Included patches: 1-1763
Modified by 
Compiled by 
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl/dyn          +vertsplit
-clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           +python/dyn        +vreplace
+conceal           +linebreak         +python3/dyn       +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       +lua/dyn           +ruby/dyn          -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              +mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +tag_old_static    
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux   -lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc        
[root@192 ~]# vi --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  3 2020 09:07:06)
Included patches: 1-1763
Modified by 
Compiled by 
Small version without GUI.  Features included (+) or not (-):
+acl               -extra_search      -mouse_netterm     -tag_old_static
-arabic            -farsi             -mouse_sgr         -tag_any_white
+autocmd           -file_in_path      -mouse_sysmouse    -tcl
-autoservername    -find_in_path      -mouse_urxvt       -termguicolors
-balloon_eval      -float             -mouse_xterm       -terminal
-balloon_eval_term -folding           +multi_byte        +terminfo
-browse            -footer            -multi_lang        -termresponse
+builtin_terms     +fork()            -mzscheme          -textobjects
-byte_offset       -gettext           -netbeans_intg     -timers
-channel           -hangul_input      -num64             -title
-cindent           +iconv             +packages          -toolbar
-clientserver      -insert_expand     -path_extra        -user_commands
-clipboard         -job               -perl              +vertsplit
-cmdline_compl     +jumplist          -persistent_undo   -virtualedit
+cmdline_hist      -keymap            -printer           +visual
-cmdline_info      -lambda            -profile           -visualextra
-comments          -langmap           -python            -viminfo
-conceal           -libcall           -python3           -vreplace
-cryptv            -linebreak         -quickfix          +wildignore
-cscope            -lispindent        -reltime           -wildmenu
+cursorbind        +listcmds          -rightleft         +windows
-cursorshape       -localmap          -ruby              +writebackup
-dialog            -lua               +scrollbind        -X11
-diff              -menu              -signs             -xfontset
-digraphs          -mksession         -smartindent       -xim
-dnd               -modify_fname      -startuptime       -xpm
-ebcdic            -mouse             -statusline        -xsmp
-emacs_tags        -mouse_dec         -sun_workshop      -xterm_clipboard
-eval              -mouse_gpm         -syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary        
   system vimrc file: "/etc/virc"
     user vimrc file: "$HOME/.virc"
 2nd user vimrc file: "~/.vim/virc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux -lncurses -lacl -lattr -ldl           
[root@192 ~]#
Why they maintain two different versions? It's a little weird to me. If they want vi users to have a modern editor, they can simply symlink to vim. Out of curiosity, below is the result on a Ubuntu 20.04 system. Both vi and vim points to nvim, which is reasonable.
root@u2004:~# which vi
/usr/bin/vi
root@u2004:~# which vim
/usr/bin/vim
root@u2004:~# ls -la which vi
lrwxrwxrwx 1 root root 20 Aug 28  2020 /usr/bin/vi -> /etc/alternatives/vi
root@u2004:~# ls -la which vim
lrwxrwxrwx 1 root root 21 Apr  1 08:28 /usr/bin/vim -> /etc/alternatives/vim
root@u2004:~# ls -la /etc/alternatives/vi
lrwxrwxrwx 1 root root 13 Apr  1 08:28 /etc/alternatives/vi -> /usr/bin/nvim
root@u2004:~# ls -la /etc/alternatives/vim
lrwxrwxrwx 1 root root 13 Apr  1 08:28 /etc/alternatives/vim -> /usr/bin/nvim
root@u2004:~# man hier
root@u2004:~# readlink -f which vi
/usr/bin/nvim
root@u2004:~# readlink -f which vim
/usr/bin/nvim
root@u2004:~#
Fajela Tajkiya (1065 rep)
Apr 14, 2022, 01:52 PM • Last activity: May 23, 2025, 10:10 AM
122 votes
11 answers
191565 views
Vi vs vim, or, is there any reason why I would ever want to use vi?
I know a bit about *NIX text editors (currently migrating from `nano` to `vim`), and, after looking around a bit on the Unix & Linux SE, have noticed that `vi` is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why...
I know a bit about *NIX text editors (currently migrating from nano to vim), and, after looking around a bit on the Unix & Linux SE, have noticed that vi is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim? Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
fouric (2301 rep)
Jan 12, 2013, 04:21 AM • Last activity: Apr 16, 2025, 06:39 PM
8 votes
1 answers
273 views
bash or ksh 'vi' mode - How to jump to end of history (most recent command)?
I am a long time ksh user, and use bash under duress - both in 'vi' editing mode. One thing that has always niggled - after searching back through history for a command (.e.g ` /needle`), how do I then jump forward through the history again to the most recent command? `G` would be the logical 'vi' c...
I am a long time ksh user, and use bash under duress - both in 'vi' editing mode. One thing that has always niggled - after searching back through history for a command (.e.g /needle), how do I then jump forward through the history again to the most recent command? G would be the logical 'vi' command (i.e. jump to end of file)... but for some reason that jumps to the beginning of the history, i.e. the oldest command. Seeing that, you'd think the opposite might be correct, i.e. 1G, but it seems G commands are not accepted. Does anyone know the trick?
Annihilannic (318 rep)
Mar 21, 2025, 06:31 AM • Last activity: Mar 21, 2025, 07:08 AM
1 votes
3 answers
276 views
sudo vi fails with "Permission denied" after hardening RHEL
I recently hardened my RHEL system, and after that, ``` sudo vi ``` stopped working. When I try to run: ``` sudo vi test.sh ``` I get the following error: ``` /bin/vi: line 23: /usr/libexec/vi: Permission denied /bin/vi: line 23: /usr/libexec/vi: Success ``` ### **What I Have Checked So Far** 1. **v...
I recently hardened my RHEL system, and after that,
sudo vi
stopped working. When I try to run:
sudo vi test.sh
I get the following error:
/bin/vi: line 23: /usr/libexec/vi: Permission denied
/bin/vi: line 23: /usr/libexec/vi: Success
### **What I Have Checked So Far** 1. **vi Works Without sudo** - Running
vi test.sh
as a normal user works. - Only
sudo vi test.sh
fails. 2. **Checked File Permissions** - /usr/libexec/vi has the following permissions:
rwxr-xr-x 1 root root 1452384 Aug 5 2024 /usr/libexec/vi
- /bin/vi is:
rwxr-xr-x 1 root root 691 Aug 5 2024 /bin/vi
3. **SELinux Check** - Running
setenforce 0
and then
sudo vi test.sh
still fails. -
restorecon -Rv /usr/bin/sudo /bin/vi /usr/libexec/vi
did not help. ### **Question** Why does
sudo vi
fail with "Permission denied" while
vi
works normally? How can I restore
sudo vi
to work correctly?
RPE (11 rep)
Feb 20, 2025, 09:01 AM • Last activity: Feb 27, 2025, 07:06 AM
11 votes
2 answers
3038 views
how to recall last argument in bash with vi setting
I use `set -o vi` setting in bash. The shorcut `Alt+.` (recalling last argument of previous command) here doesn't work as in emacs mode, so what is the equivalent for vi?
I use set -o vi setting in bash. The shorcut Alt+. (recalling last argument of previous command) here doesn't work as in emacs mode, so what is the equivalent for vi?
Kossak (679 rep)
Sep 15, 2014, 01:51 PM • Last activity: Feb 13, 2025, 06:17 PM
0 votes
4 answers
78 views
editing files in batches from a huge amount of data
I ran into an issue: I have folders with usually 50-150 text files, which I need to modify.  `sed` is not an option, since the changes cannot be automated (sometimes "ss" need to be changed, sometimes not).  Most of the necessary changes were already made with SED.  I COULD...
I ran into an issue: I have folders with usually 50-150 text files, which I need to modify.  sed is not an option, since the changes cannot be automated (sometimes "ss" need to be changed, sometimes not).  Most of the necessary changes were already made with SED.  I COULD use vi * in the folder and go through each file and then save it or open each one individually, but this would make the brain sick. I would like to open 5 files in a row, and when they are done, next time I have a free brain open the next 5 files and so on.  Any smart ideas?  Unfortunately, the file naming convention don't offer "smart" chunks to modify.
Arbach (1 rep)
Oct 26, 2024, 09:52 AM • Last activity: Oct 27, 2024, 02:29 PM
36 votes
5 answers
13578 views
Stop vim from messing up my indentation on comments
For some reason Vim thinks all of my comments should have all indentation removed. If I add `#` to the beginning of a line, suddenly all leading whitespace is removed. How can I stop this? I have Janus and NERDtree installed, in case it's relevent, along with copious other personal configurations in...
For some reason Vim thinks all of my comments should have all indentation removed. If I add # to the beginning of a line, suddenly all leading whitespace is removed. How can I stop this? I have Janus and NERDtree installed, in case it's relevent, along with copious other personal configurations in my .vimrc, but none that (as far as I know) would cause such behavior.
iconoclast (9402 rep)
Dec 24, 2013, 08:53 PM • Last activity: Sep 27, 2024, 11:33 PM
34 votes
4 answers
23571 views
How to automatically strip trailing spaces on save in Vi and Vim?
Is there a `.vimrc` setting to automatically remove trailing whitespace when saving a file? Ideally (to be safe) I would like to only have this functionality for certain files, e.g. `*.rb`
Is there a .vimrc setting to automatically remove trailing whitespace when saving a file? Ideally (to be safe) I would like to only have this functionality for certain files, e.g. *.rb
Michael Durrant (43563 rep)
May 11, 2013, 12:50 PM • Last activity: Aug 24, 2024, 05:43 PM
0 votes
0 answers
31 views
how to use `vi`/`vim` in cli mode like `sed`
i need to replace some strings and due to some reason, `vi` or `vim` is my only options. but the problem is i need this to be done in a shell script, is it possible to use `vi`/`vim` in cli mode like `sed`? e.g. ``` sed 's/hi/yo/g' la.txt ``` thanks
i need to replace some strings and due to some reason, vi or vim is my only options. but the problem is i need this to be done in a shell script, is it possible to use vi/vim in cli mode like sed? e.g.
sed 's/hi/yo/g' la.txt
thanks
furynerd (21 rep)
Aug 23, 2024, 02:26 AM
1 votes
0 answers
71 views
Backspace on vim doesn't work after I create a ~/.vimrc file
I'm using `vim` on macOS, I did different tests.  Backspace doesn't work in `vim` with my `~/.vimrc`. I saw that when I remove my `~/.vimrc` file everything is ok, but whatever I write in it (any writable character or a `set nu` or anything.  When I `:wq` and come back to anyfile with `vim...
I'm using vim on macOS, I did different tests.  Backspace doesn't work in vim with my ~/.vimrc. I saw that when I remove my ~/.vimrc file everything is ok, but whatever I write in it (any writable character or a set nu or anything.  When I :wq and come back to anyfile with vim, I cannot use backspace anymore. I tried to brew uninstall vim and reinstall it many times, and it doesn't change this behaviour.  Without ~/.vimrc file, everything's perfect, but with my ~/.vimrc it doesn't behave as expected.
raphael levillain (11 rep)
Aug 19, 2024, 05:52 PM • Last activity: Aug 19, 2024, 08:24 PM
0 votes
1 answers
101 views
Bind C-h in tmux copy mode
I'm trying to bind `C-h` to move to the window on the left. Here is my tmux.conf set -g default-terminal "xterm-256color" bind -n S-down new-window bind -n C-l next bind -n C-h prev bind q killp unbind C-b set-option -g prefix C-space bind-key C-a send-prefix bind c new-window -a set-option -g histo...
I'm trying to bind C-h to move to the window on the left. Here is my tmux.conf set -g default-terminal "xterm-256color" bind -n S-down new-window bind -n C-l next bind -n C-h prev bind q killp unbind C-b set-option -g prefix C-space bind-key C-a send-prefix bind c new-window -a set-option -g history-limit 20000 set -g pane-border-style 'fg=colour1' All of these bindings work as expected in normal mode. In copy mode, they all work except C-h, which still functions as backspace and just moves the cursor left. I'm using Vi global bindings so I guess that's why. Is is possible to overwrite this Vi binding? I've tried adding unbind-key C-h first, makes no difference. The output of tmux list-keys -T copy-mode-vi | grep cursor-left is:
bind-key -T copy-mode-vi C-h send-keys -X cursor-left
bind-key -T copy-mode-vi h send-keys -X cursor-left
bind-key -T copy-mode-vi BSpace send-keys -X cursor-left
bind-key -T copy-mode-vi Left send-keys -X cursor-left
ludog (17 rep)
Jun 25, 2024, 11:07 AM • Last activity: Jun 25, 2024, 03:07 PM
5 votes
2 answers
1068 views
Vim: cw & dw whitespace inconsistency
`vim` seems to treat whitespace differently when using `cw` (change word) and `dw` (delete word). For instance with the example text below, if the cursor is over the letter `a` and I type `dw`, it will remove the remainder of the word *and* the space after, while if I use `cw`, it *dosen't* delete t...
vim seems to treat whitespace differently when using cw (change word) and dw (delete word). For instance with the example text below, if the cursor is over the letter a and I type dw, it will remove the remainder of the word *and* the space after, while if I use cw, it *dosen't* delete the white space (and leaves you in insert mode as expected). Example: example text This behavior is confusing as I would have thought the w (word) motion would be the same regardless of the d (delete) or c (change) verb.
rusty shackleford (2475 rep)
May 25, 2018, 12:31 PM • Last activity: Apr 10, 2024, 08:04 AM
89 votes
3 answers
75030 views
How to enable reverse search in zsh?
I recently switched to zsh (finally) and am loving it! So far one thing that I am missing is Ctrl + R to do incremental history search. I have the history set up properly HISTSIZE=10000 SAVEHIST=10000 HISTFILE=~/.zsh_history and I used `vi` key bindings bindkey -v But Ctrl + R does not work. It remo...
I recently switched to zsh (finally) and am loving it! So far one thing that I am missing is Ctrl+R to do incremental history search. I have the history set up properly HISTSIZE=10000 SAVEHIST=10000 HISTFILE=~/.zsh_history and I used vi key bindings bindkey -v But Ctrl+R does not work. It removes the line above the current line, which is not the behavior it should have in vim either. Any suggestions?
Ali (7243 rep)
Jan 27, 2012, 01:47 PM • Last activity: Mar 30, 2024, 08:18 AM
1 votes
1 answers
493 views
quick-swap TUI mode while using vi keybindings in GDB
In the default mode of `gdb`, pressing `ctrl+x a` turns on and off the UI, and `ctrl+x 2` cycles through different split views. There are a number of similar useful shortcuts. I can turn on `vi` emulation either with `esc ctrl+j`, or by adding `set editing-mode vi` into `~/.inputrc`. When `vi` emula...
In the default mode of gdb, pressing ctrl+x a turns on and off the UI, and ctrl+x 2 cycles through different split views. There are a number of similar useful shortcuts. I can turn on vi emulation either with esc ctrl+j, or by adding set editing-mode vi into ~/.inputrc. When vi emulation is enabled, ctrl+x now puts the characters ^X into my prompt, and the shortcuts cease to function. How do I fix this? Cheers
Fraser (111 rep)
Jun 7, 2023, 09:00 PM • Last activity: Mar 8, 2024, 05:34 AM
1 votes
2 answers
43 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 disble this without stepping on these files?
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 disble this without stepping on these files?
Steve Dutky (111 rep)
Jan 6, 2024, 07:38 PM • Last activity: Mar 1, 2024, 07:12 PM
14 votes
3 answers
17750 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 is: That seems to do nothing. However when I put the exact same directive into my user's `.vimrc`...
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 is: That seems to do nothing. However when I put the exact same directive into my user's .vimrc file it works. Is this expected behaviour? Did I miss something? Has anyone a solution which doesn't involve managing a .vimrc file for each and every user? Thanks in advance! I am on Debian 10, fully updated by the way.
Thorian93 (772 rep)
Nov 11, 2019, 07:58 AM • Last activity: Feb 25, 2024, 08:09 PM
3 votes
4 answers
4565 views
Move in crontab -e editor
I'm trying to manipulate the editor of crontab but it's really really confusing. So I launch the creation of a new crontab with `crontab -e` Then the default editor opens. Now from there, it's seems to be LAGGING !!?? How do I move around in the editor ? How do I get "--INSERT--" to show and then wr...
I'm trying to manipulate the editor of crontab but it's really really confusing. So I launch the creation of a new crontab with crontab -e Then the default editor opens. Now from there, it's seems to be LAGGING !!?? How do I move around in the editor ? How do I get "--INSERT--" to show and then write my "script" and then type :wq to write and save exit ? How can I go back to writing mode after pushing once esc or : ?
user179255 (39 rep)
Jul 11, 2016, 11:53 PM • Last activity: Feb 14, 2024, 03:41 PM
94 votes
1 answers
172309 views
vi - How go to line N?
In vi editor how do I go to a particular line? For example if I open a file named file.py is there an option for open the file at a particular line, or can I open my file and then go to line with keyboard shortcut?
In vi editor how do I go to a particular line? For example if I open a file named file.py is there an option for open the file at a particular line, or can I open my file and then go to line with keyboard shortcut?
Antoine Subit (2349 rep)
Sep 10, 2018, 02:07 PM • Last activity: Jan 25, 2024, 11:59 PM
Showing page 1 of 20 total questions