-
Notifications
You must be signed in to change notification settings - Fork 0
Philosophy
[under development]
evangelist
, a.k.a. evn
, is a somewhat plugin manager with
sensible configurations for zsh, bash, Vim, Tmux, and Jupyter.
It is easy to install and get a similar set of settings over
all of your laptops or/and remote machines.
TODO
Evn creates folder custom
on install for storing user settings that persist
through updates and are sourced on the shell startup in the last turn. Thus,
making it possible for users not only to add new settings but overwrite
the defaults. It also adds a set of aliases for editing customization files.
-
zshrc
is equivalent tovim $EVANGELIST/custom/custom.zsh
-
bashrc
─vim $EVANGELIST/custom/custom.bash
-
vimrc
─vim $EVANGELIST/custom/custom.vim
-
NOTE: there is no
tmuxrc
There was a dispute in the early development of installation scripts whether to harness commands that require root privileges or adjust code in the way it requires minimal unobtrusive user interaction. The latter choice seemed to be a better option. This is why:
-
not every user has access to sudo.
-
without root privileges, it is less probable to break
the whole system with malfunctioning software. -
user can see clearly what sudo is used for.
TODO
By this point, evangelist has its own code style and does not follow strictly any known standards. Though it is historically so, the style will change, get better, and take more generally accepted norms and forms.
-
flow control
If today's rules impose no usage of
;
in flow control statements - in the future, we will come closer to Google's "Shell Style Guide" (which dictates placing semi-colon after condition or loop range)recent update: we put
then/do
on the same line withif/for/while
if it fits the line (<80 chars wide) and condition ends with]]
(for if-statements). -
comments
In Vim or Bash, comments should start with
""
or##
, respectively, if they are literally comments and not commented out lines of code. The latter, in turn, uses single char (#
or"
) comments. In the evangelist project, not only can you find double-char comments explaining "what this is for" but also "how it works". With that said, the repository also has value in exploring Linux and a better understanding of its utilities. -
namespaces and encapsulation
The whole project is divided into many files. Configs are grouped in some way, and so is the evangelist's code. Here we will discuss a few ambivalent moments in the latter. There is a set of functions defined in
_impl/write.sh
and used throughout the implementation of the plugin manager. -
borrowed code snippets
Adopted code (if it is not folklore) is always cited (i.e., credits from where it was taken should be left), and its code style is kept original if no modifications are required.
-
immediate write to
$HISTFILE
vs. temporary history fileCurrently, the immediate write is enabled on a remote server, and staged write is leveraged on a local machine. In general, staged write helps to keep command histories in different terminal panes/windows separate - which is in many cases a desirable option. However, this or even "smarter" isolation can be achieved with the use of plugins. Contrarily, immediate write is preferable due to the high probability of disconnect and loss of history as a result.
-
Zplug vs. Zinit vs. zcomet
Early on,
evn
relied on Zplug, which was quite popular at the time and still is, but newer zsh plugin managers have emerged, like Zinit and zcomet. They both surpass Zplug in the shell startup time. Moreover, Zplug has a bug: it hangs on install if hook-build is used. User encounters it at least once when running the most popular Zplug configuration the first time. zcomet is much easier to set up than Zinit and more congenial to evangelist, so I decided to stick with it. -
CoC vs. YCM vs. Native LSP support
Long story short, CoC covers a wider functionality range (cf. YCM) and supports many computer languages, however, it is so bulky and requires node version that is currently not provided by the default package manager. YCM is more modest and a nice alternative to CoC. The ideal variant is native LSP support that was added in Neovim 0.5.0, though. Today
evn
uses Coc by default.