- Make sure you have Emacs with treesitter support:
M-:
(treesit-available-p)
RET
should returnt
- Make sure you have installed python treesitter grammar
Vim has built-in gx
mapping to open an URL under the cursor defined in the
bundled netrw
plugin. It is limited to barebone urls and quite often that is
not enough.
I have come up with a better gx
mapping (for me of course) that is able to open:
-
markdown links
[Hacker news](https://news.ycombinator.com 'link to Hacker news website')
; -
asciidoc links
https://news.ycombinator.com[Hacker news]
;
Vim has :h skeleton
help topic for when you want to read a skeleton
(template) file into a new file.
For me the idea of automatic templates is not that appealing, instead I would rather insert a template when I need it:
:r ~/.vim/asciidoctor/template_for_entity_relation_diagram
" Author: Maxim Kim <habamax@gmail.com> | |
" Desc: Sync current buffer with the github gist having the same file name. | |
" | |
" Prereqs: | |
" 1. Install and setup https://cli.github.com/ | |
" 2. Put this file to ~/.vim/autoload/gist.vim | |
" | |
" Usage: Open file and :call gist#sync() | |
" | |
" Create helper command if needed |
- `Better gx`_
- `Simple Templates In Vim`_
- `gist.vim`_ create and update gists out of existing files.
- `Swap words`_
- `Annoying search highlight "everyone" tries to get rid of`_
- `Some useful custom text objects`_
- `Simple journal`_
You have turned on hlsearch
for some reason in your vim config (well
obviously to highlight your searches) but it gets in your way, right?
Now you try to find a solution to this problem, like
-
spam random searches
/klsdf<CR>
-
do
:nohl
command or
So how would you use your text editor to make a daily notes?
For vim I end up using simple approach:
-
have a
~/docs/journal/
directory where I keep yearly journals in asciidoc format (one can use markdown of course). -
have a mapping to quickly open a journal ready to enter you thoughts, notes or a todos for a day.
-
Install
VcXsrv
(if it starts after installing, stop it). -
Start it using the newly installed program
XLaunch
(search in the start