VimTricks (@vim_tricks) 's Twitter Profile
VimTricks

@vim_tricks

Email newsletter sending bite-sized Vim tips, tricks, plugins, and recipes vim.town/@vimtricks

Find us now on Bluesky: bsky.app/profile/vimtri…

ID: 869181910983094272

linkhttps://vimtricks.com calendar_today29-05-2017 13:21:31

3,3K Tweet

55,55K Followers

126 Following

VimTricks (@vim_tricks) 's Twitter Profile Photo

More accurately match patterns in Vim by using non-greedy matching: Instead of using .* use .\{-} πŸ‘‰ Read the tip: bit.ly/340ORGc πŸ“¨ Get exclusive tips and tricks in our newsletter: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Lost inside your parenthesis? Tangled up in a web of Lisp? Vim can highlight the other side of your current bracket with :set showmatch πŸ‘‰ Full write-up: bit.ly/2EvNfuR πŸ“¨ Subscribe for weekly Vim tricks: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Did you know you can paste into Vim's command line with Ctrl-r and * ? πŸ‘‰ Read the tip: bit.ly/3cDjbui πŸ“¨ Level up with our weekly VimTricks newsletter: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Open a file directly to a pattern in Vim: vim some_file.name +/your_pattern Why? The pattern in your terminal history allows repetition. Useful for .env or config files. πŸ‘‰Read the tip: bit.ly/2GvpSCE πŸ“¨ Free weekly tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Indent or backdent the current line while in insert mode -- helps to make more repeatable edits. β€’ ctrl-t - Indent the current line β€’ ctrl-d - Backdent the current line πŸ‘‰ Read the tip: bit.ly/3onx4CM πŸ“¨ Subscribe for more: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

3 ways to delete in insert mode - build edits you can repeat with dot: β€’ ctrl-h – Delete previous char β€’ ctrl-w – Previous word β€’ ctrl-u – Entire line (except indent) πŸ‘‰ Read the tip: bit.ly/3onx4CM πŸ“¨ Subscribe for more: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Stay in search mode in Vim by using Ctrl-g and Ctrl-t after searching for a pattern, instead of pressing enter. Refine your pattern faster this way. Read the tip: bit.ly/2Gq6p6u Subscribe for free Vim tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Use :%! to filter the entire buffer through an external command. Many great uses for this, such as using Unix text tools or linting. πŸ‘‰ bit.ly/3CqE5sE πŸ“¨ Subscribe for more tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Enable mouse support in Vim: set mouse=a Our blog post has a list of reasons. But the most useful, even for keyboard warriors, is to resize splits with a quick drag. πŸ‘‰ Read the tip: bit.ly/3dsIjET πŸ“¨ Subscribe for more: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Scroll two splits simultaneously in Vim with :set scrollbind or toggle with :set scb! Useful for comparing two files. Read the tip: bit.ly/33h01rb Subscribe for free weekly Vim tricks: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Replace across multiple files in Vim, without any plugins: β€’ :args path/* β€’ :argdo %s/some/sub/g β€’ :argdo update πŸ‘‰ Read the tutorial: bit.ly/36vrTtP πŸ“¨ Get weekly Vim tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

You can use ddp to move the current line down in Vim. But I use mappings for Ctrl-j and Ctrl-k to move one or more lines up or down quickly... πŸ‘‰ Read the tip: bit.ly/3dhJuqn βœ‰οΈ Free weekly tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Ctrl-a and Ctrl-x will increment or decrement the next number on the line. But also: β€’ Use speeddating.vim to increment dates β€’ Try visual-increment.vim to increment a whole list πŸ‘‰ Read the tip: bit.ly/2GXIwU6 πŸ“¨ Get weekly Vim tips: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Do you Vim 8's package manager or third-party options? Why? We wrote up an overview of 4 options in today's edition of VimTricks: β€’ Vim 8 native β€’ Pathogen β€’ Vim-Plug β€’ Vundle Read the post: bit.ly/2T1pRJG Get weekly Vim tips: bit.ly/vimtricks

Do you Vim 8's package manager or third-party options? Why?

We wrote up an overview of 4 options in today's edition of VimTricks:

β€’ Vim 8 native
β€’ Pathogen
β€’ Vim-Plug
β€’ Vundle

Read the post: bit.ly/2T1pRJG  
Get weekly Vim tips: bit.ly/vimtricks
VimTricks (@vim_tricks) 's Twitter Profile Photo

Use text objects to make efficient changes: β€’ da" - Delete Around quotes β€’ di] - Delete Inside brackets β€’ ci{ - Change Inside braces β€’ dap - Delete Around Paragraph β€’ vaw - Visually select Around Word πŸ‘‰ Read: bit.ly/3o2Dff7 πŸ“¨ Subscribe: bit.ly/vimtricks

Use text objects to make efficient changes:

β€’ da" - Delete Around quotes
β€’ di] - Delete Inside brackets
β€’ ci{ - Change Inside braces
β€’ dap - Delete Around Paragraph
β€’ vaw - Visually select Around Word

πŸ‘‰ Read: bit.ly/3o2Dff7  
πŸ“¨ Subscribe: bit.ly/vimtricks
VimTricks (@vim_tricks) 's Twitter Profile Photo

Did you know that Vim's built in netrw plugin lets you edit files remotely over SCP? πŸ‘‰ Tutorial: bit.ly/2Hn2IPi πŸ“¨ Subscribe for weekly Vim tricks: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

Remove lines matching a pattern with the g command: β€’ :g/pattern/d - Remove lines matching pattern β€’ :g!/pattern/d - Remove lines that do NOT match πŸ‘‰ Read the tutorial: bit.ly/3e19bvX πŸ“¨ Subscribe to the newsletter: bit.ly/vimtricks

VimTricks (@vim_tricks) 's Twitter Profile Photo

The :reg command in Vim will show you the contents of your registers. The Peekaboo plugin shows a sidebar with the same automatically. πŸ‘‰ Read the tip: bit.ly/39McpCp πŸ“¨ Subscribe for more: bit.ly/vimtricks