The process isn’t too involved, but it does require the command line. If you’re used to using vi and vim, then you’re already familiar with how to bring it up. Click on the K menu in KDE or the Whisker menu in Xfce4 and click on Terminal in System Tools. You can find it in the same place on the Applications menu in GNOME Shell and LXDE. Ubuntu Unity users can search for the word Terminal on the Dash, or you can use Ctrl+Alt+T to bring one up.
Method 1: Assigning the WASD Keys to vi & vim
Since the WASD keys already have something assigned to them in vim, you’ll want to use a modifier key. It would be easy enough to hold down Alt and these keys, but we need to make sure that your terminal emulator doesn’t already assign those shortcuts to something. At the terminal, type cat and push enter. Push Alt+W, Alt+A, Alt+S and Alt+D to see if some weird command codes come up. You might also notice that some menus drop down as we did when we did this with the xfce4-terminal that we were using for taking screenshots.
Type Ctrl+C to exit, which might also cause some odd unprintable Unicode characters to splatter onto your terminal. You can safely ignore these. Instead, type vim ~/.vimrc to load up your configuration file. Hold down the j key until you get all the way at the bottom and then type I to enter insert mode.
Push enter to get an extra line, and then what you want to put in depends on if your terminal emulator acted up at all. If not, then add these four following lines:
noremap
If you did have a problem, then instead try this:
noremap
In either case, push Esc and then type :wq to save your work. Try loading up vim again and see if you can now use the WASD keys when you’re not in the insert mode like they’re cursor keys. You’ll more than likely have to either hold down Alt or Esc when using them since those keys are already assigned, but other than that they should work just fine. This is the fastest way to do this without any additional playing around, but there are a few other methods you can try if this either didn’t work or if you’d prefer other key combinations.
Method 2: Using Alternate Alt Assignments
If neither of these techniques work, then type vim ~/.vimrc again to load up your rc file again and hold the J key until you’re all the way at the bottom. Type I to edit again and now change the bottom section to read thusly: noremap ^[a h noremap ^[s j noremap ^[w k noremap ^[d l Some users report actually physically typing a caret (^) followed by an open bracket ([) while others say that they actually need to either hold down the Alt key combinations or, alternatively, copy and paste the command codes themselves. You can always type cat at a regular command line and push Alt+A, Alt+S, Alt+W and Alt+D to get these, which you can then highlight, copy with the Edit menu and then paste with the Edit menu into vim if at all necessary. Once again, this method is unnecessary for most users and should be avoided. The first method uses far less playing around. You can push Esc and then type :wq to save it. Open another file in vim and test to see if your preferred keys are working at this point. This should work even with many types of alternative terminal emulator programs.
Method 3: Using Other Key Bindings
You’re not restricted to the default HJKL keys nor the gamer-preferred WASD keys. Some people prefer to use other sets. In your .vimrc file, you can actually replace the section:
noremap
Prevent Cursor from Moving when Pressing Direction Keys Windows 10How to: Exit vimHow to Fix Cursor Blinking in Windows 10?How to: Change Your Cursor/Pointer in Windows 10