mirror of
https://github.com/jbranchaud/til
synced 2026-01-08 09:38:04 +00:00
Add Almost The End Of The Line as a vim til
This commit is contained in:
21
vim/almost-the-end-of-the-line.md
Normal file
21
vim/almost-the-end-of-the-line.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Almost The End Of The Line
|
||||
|
||||
If you are visually selecting from the cursor to the end of the line, you
|
||||
will probably hit:
|
||||
|
||||
```
|
||||
v$
|
||||
```
|
||||
|
||||
This isn't always ideal though because the visual selection includes the
|
||||
newline character at the end of the line. If instead you'd like to select to
|
||||
the last non-blank character on the line you can use the `_g` motion. This
|
||||
is great for deleting to the end of the line.
|
||||
|
||||
```
|
||||
dg_
|
||||
```
|
||||
|
||||
See `:h g_` for more details.
|
||||
|
||||
h/t Dorian Karter
|
||||
Reference in New Issue
Block a user