vim settings: tabs, spaces, indents

Basics tabstop – amount to indent when using <Tab> shiftwidth – amount to indent when using ‘>’ or ‘<‘ expandtab – always insert spaces at the amount of tabstop set tabstop=4 set shiftwidth=4 set expandtab   How to change tab size based on filetype setting it inline make sure there are no spaces between the…

How to detect if a user is online

How to detect if a user is online

Many browsers have implemented events “online” and “offline”; in addition to this, browsers also expose the navigator.onLine property that will return “online” or “offline” How many browsers is many? caniuse says every major browser (Chrome, Firefox, Safair, IE11…) except Opera mini has this functionality (as of July 4th 2018). How can I check the online status? > navigator.onLine…

why vim?

vim is vi(improved) vim is a powerful way that allows you to transform your thoughts into action in as little keystrokes as possible. In fact, the subtitle of the book Practical Vim is this: “Edit Text at the Speed of Thought” With that said, vim has a steep learning curve that often does not feel…

Intro to OSX File Management Commands

Filenames can have spaces! So when you deal with them either surround the filename with apostrophes like this: “my file name.txt” or escape the spaces my\ file\ name.txt. Otherwise, don’t create new file names with spaces or escape characters to keep your sanity. Wildcards * greedy wildcard ? single character wildcard [] single character list of wildcards {} pattern list of…

Setting up .vim directory

vim settings are important for every vim user and you shouldn’t have to use a vanilla vim setup just because you ssh into a VM or set up a new computer. Since most vim settings have zero personal data, the  most convenient thing to do is to upload your vim directory+settings onto the internet for the world to bask…

Mac Unix Command Basics for Beginners

These are useful unix commands that are entered through a Terminal shell prompt. These commands are actually names of Unix programs that usually sit in a folder called /bin where am i? pwd How to check the current directory $ pwd learn more about anything – man How to bring up the manual page for a command:…