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/
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
Nice. You can specify how large a new window in #vim by adding numbers beforehand.
So ctrl+w and 20v
or
:vertical 20 new
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=unnamed
2. 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 expandtab
3. Profit
Paste anywhere you want
filetype off
filetype plugin indent on
Fun vim tip before lunch: imagine you've selected a block and still in VISUAL mode but need to select some lines above the selection.
- Press "o"
- Move the cursor
- Press "o" again if you want a couple of times ;) ;)
And there you go, you can change the cursor in visual mode from top to bottom with just 1 key press.
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/
@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