Vim | +vim

  • [ ] Find how to include taskwarrior tasks from title filters #3c010356

    • [ ] Check this issue for markdown viewport functionality #bebc44b2

    Having two way syncronization should be a must.

  • [ ] Find a way to automatically include mardkwon partials. #c46f1ecf
    Something like mardkown pp can be the key to achieve this

Fix weird characters on nvim

Source: https://github.com/neovim/neovim/issues/5990

1
export VTE_VERSION="100"

Fix javascript file using standard

1
2
3
4
5
" From command mode
:!standard --fix %

" Automatically fix js files when save
autocmd bufwritepost *.js silent !standard --fix %

Using vimwiki as emacs orgmode:

  • [ ] Search plugin to run code snippets from markdown code ! #d6613fff
  • [ ] Find a way to make filesystem links #916e0e58

Sort lines alphabetically

Taken from here. Select lines to sort with visual mode (Ctrl + V)

Inoke sort:

1
:sort

NerdTree

  • Set up toggle key binding:
1
nmap <C-e> :NERDTreeToggle<cr>

HOWTO See recent files

1
:ol

vimwiki

  • [X] Test vimwiki #9612cdf9

https://github.com/vimwiki/vimwiki

  • [X] Check a way to manage the wiki from Android #c0bbcb07

Cheatsheet

http://thedarnedestthing.com/vimwiki%20cheatsheet

Wiki management

|———————-|———————————|
| Action | Description |
|———————-|———————————|
| [number] ww | open wiki index file |
| [number] wt | open wiki index file in new tab |
| ws | list and select available wikis |
| wd | delete wiki page |
| wr | rename wiki page |
|———————-|———————————|

number is relative wiki order as defined in .vimrc, default 1.

Diary management

|——————————–|———————————————|
| Action | Description |
|——————————–|———————————————|
| [number] wi | open diary index file for wiki |
| w i | update current diary index |
| [number] w w | open today’s diary file for wiki |
| [number] w t | open today’s diary file for wiki in new tab |
| | open previous day’s diary |
| | open next day’s diary |
|——————————–|———————————————|

number is relative wiki order as defined in .vimrc, default 1.

|————-|————————————-|
| Action | Description |
|————-|————————————-|
| | follow/create wiki link |
| | follow/create wiki link in new tab |
| | go back to previous wiki page |
| | go to next link on current page |
| | go to previous link on current page |
|————-|————————————-|

Editing shortcuts

|————|————————————|
| Action | Description |
|————|————————————|
| | toggle list item on/off |
| = | add header level |
| - | remove header level |
| + | create/decorate links |
| glm | increase indent of list item |
| gll | decrease indent of list item |
| gl | or gl8 switch or insert “” symbol |
| gl# or gl3 | switch or insert “#” symbol |
| gl- | switch or insert “-“ symbol |
| gl1 | switch or insert “1.” symbol |
|————|————————————|

Table shortcuts

|————|———————————–|
| action | Description |
|————|———————————–|
| | move column left |
| | move column right |
| | (insert mode) go down/create cell |
| | (insert mode) go next/create cell |
| gqq or gww | reformat table |
|————|———————————–|

text objects

|——–|———————————————————–|
| object | Description |
|——–|———————————————————–|
| ah | section between 2 headings including empty trailing lines |
| ih | section between 2 headings excluding empty trailing lines |
| a\ | table cell |
| i\ | inner table cell |
| ac | table column |
| ic | inner table column |
|——–|———————————————————–|

⬆︎TOP