My opinion of a “minimal” vimrc might be different from yours, but for me, it means
Not using external plugins
< ~100 lines
Reducing vi related pain-points
So here’s what I do:
Source default settings
While this may not be necessary most of the time, it is still worth it to check
that it has been sourced IME. It is a small fine to pay for ensuring you have
the defaults you deserve.
These are some thoughts about my personal experience with learning a new programming
environment like shell scripting (but this applies to almost any new environment).
This is mainly based off mistakes and pitfalls I’ve fallen into in the past, so this
post will be pretty cathartic, but perhaps it could be help someone out there.
5 Tips
Don’t try to memorize every command, every API, every function, etc.
Learn enough to become functional in the environment. Build something and move on.
Think twice about what you’re trying to accomplish before considering tools.
Have a structured process for getting help and use it frequently.
Realize that commands/interfaces have different design goals and that’s OK!
Know when a command/library/framework doesn’t mesh with the problem you’re trying to solve.
I’ve been trying to get used to PowerShell for a little while now and while it
is difficult to adjust coming from other shells, there are some modules I have installed
that make it much less of a pain.
Modules are really core to what makes PowerShell extensible and you can read more about them here
but they work similar to other OOP languages and just like other interpreted
scripting languages, loading too many modules will slow down performance.
Using Linux has spoiled me when it comes to easily installing software.
The fact that there is a default package manager for every distro can be taken
for granted sometimes.
There are lots of open source, community driven package managers for
proprietary systems as well.
Mac users boast homebrew,
as their de facto package manager, but what about Windows?
Well I’ll tell you – Windows has had a few package managers over the years.
Open chrome and go type chrome://flags in the address bar.
Search for “video decode”
Change “Hardware-accelerated video decode” from “Disabled” to “Enabled”
Another way to enable these flag features is creating a config file called
~/.config/chrome-flags.conf for chrome or ~/.config/chromium-flags.conf
for chromium.
The Chromium Development Documentation Project [1] / "The Chromium Authors" as per the open source development agreement, CC BY 2.5, via Wikimedia Commons
Exposition
These days browsers can store a lot of user data on your local computer if
you let them.
They also urge you to create an account and login so that your browsing data +
tons of other data can be synced to a server.
Denis Zastanceanu, CC BY-SA 4.0, via Wikimedia Commons
Shell
Getting the current working directory
The environment variable $PWD and the command pwd are essentially synonymous.
pwd has flags for dealing with symlinks.
Absolute (canonical) path
realpath - Turns relative paths into absolute paths
readlink -f - Originally meant to read symlinks. The -f flag means give “cannonical” path.
Elements of a directory
dirname - Strips the rightmost part from a given directory.
basename - Strips all base directories, leaving the last (rightmost) part of a path/file
NOTE: These commands do not check if a file/directory actually exists, they just
manipulate path strings. Also, be careful when dealing with symbolic links and
read the man page to get the desired behavior.
The initial process that runs on a Unix/Linux system is responsible for
forking the rest of the processes that are needed in order to “boot” the
system. This is the core function of an init-system. It is effectively the first process
where execution is handed off from the kernel to “userspace”, where processes
get PIDs, cpu time and network/memory/disk access via calls to the kernel or kernel modules
(drivers).