1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

29 Commits

Author SHA1 Message Date
jdhao
51a004e865 add notification for Redir command 2021-10-23 20:57:00 +08:00
jdhao
421111f474 refactor: load colorschemes randomly
In Emacs, there is `seq-random-elt` which randomly selects an element from
a sequence. We mimic it here in Neovim.

Ref: https://www.gnu.org/software/emacs/manual/html_node/elisp/Sequence-Functions.html.
2021-10-15 23:20:35 +08:00
jdhao
fa203cf3b8 feat: make :edit command supports file glob patterns 2021-08-13 23:27:17 +08:00
jdhao
6e1ae51474 Fix: remove logging 2021-08-13 01:19:47 +08:00
jdhao
70d7f3aea5 Add Redir command to capture command output easily 2021-08-13 01:17:57 +08:00
jdhao
fe26dfa9c1 Use custom git branch name for vim-airline
Airline relies on fugitive to get the branch name, but fugitive is
conditionally loaded. So the branch name is not shown. We need to
provide our own function to get the branch name.
2021-08-08 22:06:47 +08:00
jdhao
f690cdbf1d Better way to call lua function inside vim script 2021-08-07 21:48:28 +08:00
jdhao
8dffa8bd23 chore: formatting and fix spell errors 2021-08-07 03:15:22 +08:00
jdhao
d434627738 Fix: the loading condition for fugitive is wrong
We should load fugitive in the following two situations:

+ When we open nvim in a Git repository
+ When we are inside nvim and change the working directory to a Git
  reposity
2021-08-07 02:32:12 +08:00
jdhao
c4d050e99d Use nvim-notify for showing messages 2021-08-05 01:57:35 +08:00
jdhao
f7475f3e4f Refactor: use a unified log function 2021-07-24 14:53:48 +08:00
jdhao
764bd0c2bb fix: use normal!
Use command normal! to avoid any mapping being accidentally used.
2021-07-13 22:42:40 +08:00
jdhao
eb0c63c175 Make a plugin for leaving insert mode 2020-12-16 01:33:03 +08:00
jdhao
9a7ac4c9d1 Using jk to escape insert mode without lagging.
See https://jdhao.github.io/2020/11/23/neovim_better_mapping_for_leaving_insert_mode/.
2020-11-24 22:55:39 +08:00
jdhao
ba3254bd65 refactor: move titlestring method to autoload dir 2020-11-08 22:20:40 +08:00
jdhao
bb242b7699 Use lua to generate random int. 2020-10-19 22:37:08 +08:00
jdhao
4537bab436 update fold text style 2020-09-30 19:28:35 +08:00
jdhao
191abbcf88 update foldtext function 2020-09-30 16:23:38 +08:00
jdhao
cb478b5ce1 add ! for custom functions 2020-09-27 21:30:30 +08:00
jdhao
5c4223b27d add mapping to move single or multiple lines 2020-09-27 21:29:46 +08:00
jdhao
c226973bd5 refactor: simplify if else 2020-09-27 19:20:42 +08:00
jdhao
ab07e4069e use printf for string concatenation where needed 2020-09-27 18:46:12 +08:00
jdhao
b65c7c6d70 change vim script style from 4-space indent to 2-space 2020-09-26 09:15:40 +08:00
jdhao
00cbed4cdc fix style issues as per vint 2020-09-24 23:01:10 +08:00
jdhao
e2b32df47f
add abort for functions 2020-09-21 20:18:32 +08:00
jdhao
1a3738ff09
Update utils.vim 2020-05-06 11:55:38 +08:00
jdhao
cfaf341754
update: add function to toggle cursorcolumn 2020-04-29 20:54:52 +08:00
jdhao
1b97735bf2 chore: remove short url and replace with true url 2020-03-30 23:32:11 +08:00
jdhao
6428422cbd Simplify init.vim and move settings to autoload and after directory 2019-09-12 21:29:00 +08:00