I don't go a day without opening up my text editor. If it's a casual day, I might be reading something with it. If I'm productive, I'll probably be writing something in it. Either way, I'll be using a text editor for something or another. There's a lot to consider about them, so let's dive in.
What is a text editor?
A text editor is a program that edits text documents. Text documents being, files that contain text data. There are quite a few text editors out there. Everyone has their own preferences of which one to use. Which one you pick will just depend on what your needs are. If you are a programmer, you probably already have a choice of text editor to use.
Concerning the choices of text editors to use. If you are on Windows, the built in text editor is Notepad. Some prefer the editor Notepad++. There's also one called PSPad. If you are a Linux user, you might use Pico, Emacs, or Vim.
Vim is my text editor of choice. It has a lot of nice features for editing text. One thing I love about it is that Vim works on different platforms. You can run Vim on Windows, Linux, MacOS, or Android. There's a bit of a learning curve to it, but once you get past that, all the things you learned on one platform will transfer to other platforms. This is very convenient. Getting used to Vim on Windows, for example, then going to Linux, your editing tasks will still be familiar. To me this makes the learning curve well worth it. I use Vim on Windows, Android, and Linux.
When you open a document in the Vim text editor, you start off in normal mode. Modes are a fact of life in Vim. You have to be cognisant of what mode you are in at all times. In normal mode, you can navigate the document and you can perform editing operations. One common thing that you might do with a text document is copy some text to your clipboard. Vim takes this concept to the next level. Sure, you can use your system clipboard, but in Vim, you also have a set of named registers. You can copy text to one of these registers, then paste it elsewhere in your document. There's 26 named registers, one for each letter of the English alphabet. Being able to copy multiple things at once is quite handy, especially when working on software, where you might be moving several different pieces of your document around. It's like having 26 clipboards available to do while you edit your document.
Commands in Vim can be single key presses, or they can be a chord of keys that you press in sequence. Some commands change Vim's mode. Let's say you want to move the cursor around in your document. In normal mode, you can press the j key to move the cursor down, the k key moves it up, the h key moves it to the left, and the l key moves it to the right. You'll note these keys are on the home row of your keyboard. This can make navigating your document very convenient.
That is, unless you don't use the qwerty keyboard layout. Me, I usually use the Dvorak layout. In the Dvorak layout, the key that is marked al a j on the keyboard, if I press it, it types an h. The key that is marked as a k, if I press it, a t is typed. Great, you think, so how should I type a j then? Easy, I press the key on my keyboard marked with a c. Pressing said key types the j key, and should I wish to type a k, I will then press the v key accordingly, upon which the k is typed. So on, and so forth, with all the characters that I should wish to type. I'll go on about Dvorak in another post, probably, but let's go back to the subject of text editors.
Movement commands in Vim, h, j, k, l. Since these keys are in all different places on my keyboard, it can be awkward to use them in Vim. What can be even more confusing is when I switch back and forth between the Dvorak layout and the qwerty layout. I'll get used to typing "vvv" moving up 3 lines, using Vim in the Dvorak layout, then I'll switch over to another system and use Vim there with qwerty. The "v" command switches to visual mode, so I press the "v" key there, still being used to the Dvorak layout, and instead of typing a k and moving up one line, it types a v and I switch to visual mode. Such is life, going back and forth between Dvorak and qwerty.
Imagine how awkward when someone watches me type something on my keyboard and then different keys come on the screen. One person told me their Wifi password and watched me type it in. "Wrong!" he declares, seeing me type keys that don't match the letters he said, but in fact they do match, since I'm actually typing in Dvorak. If you type in both Dvorak and in qwerty, you might have to learn Vim twice then - learn it once in Dvorak and then learn it again in qwerty because all the command keys will be in different places. Naturally you can just memorize the letters, but then you'll have muscle memory about where the command keys are. That's where the real problems start. You gain muscle memory for using Vim in a particular layout, then you switch to qwerty and your fingers get all mixed up. I'm not complaining though. This is just how things are using Vim and switching to different layouts. Even so, I highly recommend using Vim for your text editing. Even if there's a learning curve and it's awkward switching between keyboard layouts, it's well worth while.
There are no comments for this post.
Would you like to leave a comment?