Multiple ways of selecting text

Today, let’s talk a bit about text selection.

One of the greatest decisions I’ve ever made in my digital life a few years ago was to invest more time in Vim.
Editing, especially when working with code, just becomes so much smoother—almost addictive. The VIM-COMBO really does feel like some divine superpower bestowed upon the worthy!
And now, with Emacs and its arsenal of tools, my digital life has never been better.

Once you get a real taste of what it’s like to use powerful text editors, going back is just torture.
To give you an idea, every time I see someone struggling with the aim-and-shoot method to select text, I just want to hang myself.
It’s even worse when the person is a developer editing code. I just can’t stand it—my anxiety goes through the roof.

For anyone who’s curious, here is my own ranking of text selection methods along with some descriptions:

Level 1: Aim and shoot (for mortals)

This is where everyone starts: you point your mouse, click down, and drag to highlight your text.
If you want to get fancier, you can hold Shift and click at the end of your target area.
The drawback is, of course, you have to be better at aiming and not have shaky hands.
If you miss your aim, you have to restart the entire process.

Level 2: Ctrl Shift Arrow (superman)

This technique is used by seasoned computer users.
Park the cursor, hold down Shift and use the arrow keys to expand or reduce the selection.
Use Ctrl to select word by word instead of character by character to speed things up.
This method is good for working on short paragraphs, but it’s still painful when dealing with selections larger than your screen.
Combining this with the previous method (Shift+click) offers a better experience.

Level 3: Vim-way (God Level)

Hit v in Normal Mode to enter the Visual Mode, which starts the selection from where the cursor is.
From Visual Mode, a sea of possibilities for selection opens up before your eyes.

  • Movement: Pair Visual Mode with arrow keys or with powerful motion commands ($, 0, ^, …)
    Examples: v$ for selecting ‘til the end of the line, or v^ for the beginning.
    You can also combine this with search (/, * command) for even greater efficiency.
  • Context: describe to Vim what you want.
    Example: vi(, you are telling Vim to “select (v) inside (i) the brackets (()“. Or vi" to select inside double quote, and so on.
    The precision is just unreal! Imagine selecting everything inside curly braces across thousands of lines of code using just vi{—with 100% accuracy.

If you are interested, resources for learning Vim are available everywhere on the internet. You can pick any format you want—whether it’s articles, videos, ebooks, or even mobile applications!

Level 4: Emacs-way (Evil)

You can do everything you would normally do in Vim: set a mark and then expand your selection using search, movement,or context.
There are also some methods unique to Emacs that are sometimes even faster and more convenient than those in Vim.
For example, M-h quickly select up to the top level, like the paragraph you are in; and M-@ to select the next word.
Both can be repeatedly executed to expand your selection further.
And there is so much more Emacs can offer.

Why did I rank the Emacs-way above Vim?
That’s because the Evil-mode brings everything Vim can do—right inside of Emacs.
You have the combined arsenal of Vim and the endless toolbox of Emacs at your fingertips!

If you are interested, why don’t you grab Emacs now! 😁
https://www.gnu.org/software/emacs/