#vimtips — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #vimtips, aggregated by home.social.
-
Stop editing at 10% of Vim's power. Master registers, :norm, fuzzy completion, linematch diff, and 16 more Vim tips and tricks. Tested on latest Vim 9.2.
Full guide here: https://ostechnix.com/vim-tricks/
-
How To Display Undo And Redo Timestamps In Vim Status Bar Using vim-airline #vim #texteditor #vimtips #vimairline #linux #opensource
https://ostechnix.com/display-undo-redo-timestamps-vim-airline/ -
Oh, look! Another ✨exciting✨ #Neovim #cheatsheet for all two people still using #Vim. Because clearly, the biggest problem with Vim is *remembering the keys*, not *escaping the editor*. 🔑💥👨💻
https://nvim-cheatsheet.vercel.app/ #Developer #Community #VimTips #HackerNews #ngated -
TIL about `<C-a>` and `<C-x>` in #vim for adding or subtracting.
(`:h ctrl-a` , `:h ctrl-x` )Ctrl-a will add [count] to a number or alphabetic character at or after the cursor.
And Ctrl-x will do subtraction in the same way.For example let's say I need to increment this 1 to be a 2.
```
replicas: 1
```Normally I would type `f1` followed by `r2`
Or maybe even just `A` <backspace> `2`But we can do better.
In this particular scenario I need only be on that line and do `<C-a>`
Since `<C-a>` will look ahead to find a digit on the current line and act upon it. Which means we can do this from the start of the line and it will turn into:```
replicas: 2
```And if I want to change it back to `1` I can use `<C-x>`
These two commands will even take a `[count]`. This means that if the current value is `replicas: 1` we can do `10<C-a>` and it will now say `replicas: 11`
-
This fixes all my complaints wrt text search and a highlighting
set nohlsearch
set incsearch -
How To Use Spell Check Feature In Vim Text Editor #Vim #Texteditor #Spellcheck #Vimtips #Linuxtips #Linux
https://ostechnix.com/use-spell-check-feature-vim-text-editor/ -
Copy to system clipboard from #vim guide:
1. In your ~/.vimrc set
set clipboard=unnamed2. Open a file and yank whatever you want, in this example we yank lines 4 and 5 to system clipboard; in command mode, type 4,5y *
set ts=2
set sts=2
set sw=2
filetype off
filetype plugin indent on
syntax on
set expandtab3. Profit
Paste anywhere you want
filetype off
filetype plugin indent on -
How To Use Spell Check Feature In Vim Text Editor #Vim #VimEditor #Vimtips #Linux #SpellCheck #Linuxhowto #CLI #Commandline
https://ostechnix.com/use-spell-check-feature-vim-text-editor/ -
How To Password Protect Text Files Using Vim Editor In Linux #Vim #VimTips #Password #Vimeditor #Linux
https://ostechnix.com/how-to-password-protect-text-files-using-vim-editor-in-linux/ -
How To Comment Out Multiple Lines At Once In Vim Editor #Vim #VimEditor #VimTips #Linux
https://ostechnix.com/comment-multiple-lines-vim-editor/ -
How To Use Vim Editor To Input Text Anywhere In Linux #Vim #Vimtips #VimAnywhere #Linux #Linuxtips
https://ostechnix.com/how-to-use-vim-editor-to-input-text-anywhere/ -
How To Edit Multiple Files Using Vim Editor #Vim #Linux #Vimtips
https://ostechnix.com/how-to-edit-multiple-files-using-vim-editor/ -
A Vim Guide for Advanced Users.
#vimtips -
@robby @vimtips @garritfra we can all be our source for #vimtips
-
And when you need the full completion madness in the command line, for example when you're editing complex Regular Expression statements, simply type `q:` from normal mode and you get the full Vim editing power in an editable command history window.
Simply type your command line statement (or select an older one) and press <CR> to execute the command line under the cursor. See :help q: -
#Vim hint of the week (because I'm searching this regulary again):
You can insert the word under the cursor while in command mode with:
<CTRL-R><CTRL-W>
This comes in handy when you want to [s]ubstitute a word, without having it to retype again.:%s/<CTRL-R><CTRL-W>/newWord/g
-
Vim Tips – Read And Write Remote Files With Vim On Linux #Vim #VimTips #Linux #scp #SecureCopy #ssh #secureshell
https://www.ostechnix.com/vim-tips-read-and-write-remote-files-with-vim-on-linux/ -
#VimTips got a healthy subconscious Ctrl+S reflex from other editor's? Use :up in vim for you for your file saving reflex. The :update command saves your file only if there are changes. Meaning: you can spam this command without causing unnecessary writes.