No Numbers, Symbols First

12 July 2016 ·

How often you have a feeling that you could do something more efficiently? Regardless of what it is. It can be related to opening files, writing a function, typing or managing windows on the screen.

As a programmer I have this feeling all the time. Here I’ve tried to describe my experience with adopting a no-colors and no-code-completion feature.

Now it’s a time for a new experiment: I’ve decided to move all the numbers to the combination of Shift+[number] and symbols to just [number].

Generally speaking during development I should not use hardcoded numbers (however I need those in styling). So instead I should, for example declare them somewhere on the top and then reference them with a constant name. After realizing that I decided to make this experiment and now the first full working day is succesfully passed.

I’ll try to keep this post updated with results of the experiment, but I have a strong feeling that it will work very nice in the long run.

This is how it looks like in .vimrc

" Remapping symbols to their pair number
inoremap ! 1
inoremap @ 2
inoremap # 3
inoremap $ 4
inoremap % 5
inoremap ^ 6
inoremap & 7
inoremap * 8
inoremap ( 9
inoremap ) 0
inoremap [ {
inoremap ] }
" ...and numbers to their pair symbols
inoremap 1 !
inoremap 2 @
inoremap 3 #
inoremap 4 $
inoremap 5 %
inoremap 6 ^
inoremap 7 &
inoremap 8 *
inoremap 9 (
inoremap 0 )
inoremap { [
inoremap } ]

Day 1

A bit hard to get used to a new layout, but in the end of the day I could easily forget about the changes. The most useful thing is remapping 9 to ( and 0 to ). Overall have a good feeling and big hopes.

Day 3

Oh, I love it. For JavaScript remapping brackets [ to { and vice versa was another great decision. I suppose we all type something like this quite often:

const fn = (a, b) => {
 if (a && b) return a * b;

Without remapping to type this we need 58 keystrokes, with = 41. So far so good!

Day 6

Still make mistakes, but much less. Started working more on styling stuff this days, thus I need to type more numbers, so I will probably switch this off for some style-specific file types like CSS, SASS, Less etc. Another observation: after switching to this layout, I subconsciously press ; when I need :, may be it’s a good idea to try this out as well.

Day 10

Reversed ; and : keys. It’s so sweet now, I can type faster and with less keystrokes! I’ll definitely stick to this mapping for a lo-o-ong time, that’s for sure.

Day 20

Very rare mistakes. I’ll never come back to the old layout. A few things still need to be tested e.g. I need to type 5 and 6 more often than % and ^, may be a bit of customization here will work, but I’m worried about consistency.

Day 30

Started prototyping my own keyboard layout, so I can build exactly what I need and I’ll take the mapping I tested to my layout :3 Here is a photo of my prototype:


Might also be interesting for you

React Router + Connected Component

A tip on how to fix issue when using connected React Router v4 and Redux in React

Use Elm as a Reducer in Redux

Want to use Elm in your project, but a bit hesitant going cold turkey? In this blog post I'll try to show how you can use the best from both worlds bulletproof Elm logic and ridiculously rich React components library.

Open RSS Reader

I'm starting a new open-source project "Open RSS Reader" that will be modular app so if you don't like the existing clients, you'll be able to quickly build your own. It's gonna be both open source and free to use.

SotM: pet - Awesome Command-line Snippet Manager

`pet` is a simple command-line snippet manager. It allows you to write and store snippets for the command-line, so you don't need to remember all the commands you frequently use in you terminal. It can sync your snippets to the GitHub Gist, so you can always take your snippets with you.


comments powered by Disqus