96 Commits

Author SHA1 Message Date
587aeef5d7 Use signcolumn=number when available 2021-04-18 14:42:33 +01:00
c67f11a8f5 Fix statusline l:mode map indentation 2021-04-18 14:42:33 +01:00
cef963d805 Remove a unused scriptencoding
There are no utf-8 special characters in the file anymore.
2021-04-18 14:42:33 +01:00
dc6a8b0032 Get rid of scrolloff 2021-04-18 14:42:33 +01:00
9a1b1ed2fc Replace vim-airline with a custom statusline
Finally got round to making a custom statusline after being inspired by
https://pastebin.com/Fm1NEgBf
2021-04-18 14:42:33 +01:00
824aeb431a Replace remaining YouCompleteMe mappings 2021-04-18 14:42:33 +01:00
4a99f582f3 Replace YouCompleteMe with coc.nvim 2021-04-18 14:42:33 +01:00
3b3121aa28 fresh: NonText as SpecialKey
Don't use `set highlight` to highlight `NonText` like `SpecialKey`,
instead simply set the color of `NonText` in the colorscheme.
2021-04-18 14:42:33 +01:00
9c64158445 Replace vim-gitgutter with vim-signify
vim-gitgutter is buggy. vim-signify might be better, it does allow
configuration of which events trigger a sign column update and this
patch takes advantage of that. Firstly, the `CursorHold` and
`CursorHoldI` events are disabled and replaced with `InsertLeave` and
`TextChanged` events. This makes the sign column updates immediate, and
since vim-signify is asynchronous it's faster too.
2021-01-26 23:45:49 +00:00
eac02b26d3 Add xterm-kitty to list of supported $TERM values 2021-01-25 21:37:09 +00:00
aaa8acf5a2 Update build#dir() to open a popup_menu()
Use `popup_menu()` in `build#dir()` when the `:BuildDir` command is uses
without an argument to specify a build directory. If there are no build
directories, print an error message. If there is a single build
directory, use it. If there are multiple build directories use
`popup_menu()` to prompt the user to select the desired build directory.

Update `build#targets()` and `build#run()` with comments and error
messages.
2021-01-06 00:23:32 +00:00
a0df92852a Add :Build command to invoke ninja or make
The `:Build [<target> ...]` command utilises the `$BUILD_DIR` variable set
by `:BuildDir {directory}` to invoke `ninja` or `make` based on the
existence of `$BUILD_DIR/build.ninja` or `$BUILD_DIR/Makefile`
respectively. The following commands are invoked in a new `:terminal`
window.

* `ninja -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/build.ninja` exists
* `make -C $BUILD_DIR [<target> ...]` when `$BUILD_DIR/Makefile` exists

In the case of `ninja`, completion for the targets supplied to the
`:Build` command is made available by the `build#targets()` function.
The list of targets returned by `ninja -C $BUILD_DIR -t targets` is
processed to generate the list of targets. Support for `make` target
completion is less straight forwards so has been omitted for now.
2021-01-05 21:45:43 +00:00
c17f7ea0d9 Refactor tmux and set-clipboard detection
Move logic to `autoload/tmux.vim` to detect the `vim` is being run
inside a `tmux` sessions and if the `set-clipboard` option is enabled.
This cleans up adding the optional `oscyank.vim` plugin when needed.
2020-12-10 18:07:24 +00:00
76acb9cd90 Once again fix minpac initialization 2020-12-10 17:41:17 +00:00
e4a11a2ffe Fix package load init order bugs
* Move calls to `minpac#init()` into commands which use minpac
* Check if optional package directories exist before using `packadd`
2020-11-28 17:16:11 +00:00
9e6169695d Use the patience diff method 2020-10-07 11:30:48 +01:00
d960053dfc Add :BuildDir to select YouCompleteMe build directory 2020-10-06 17:12:06 +01:00
3449b3f815 Disable automatic hover in YouCompleteMe 2020-07-21 12:01:41 +01:00
8fac5fb74f Add OSC 52 escape sequence yank
If the `tmux` `set-clipboard` option is set to `on` add the `osc52yank`
plugin and change `<leader>y` mapping to use it.
2020-04-02 12:12:57 +01:00
27c77881a3 Silent call tmux navigation flag functions 2019-08-21 14:57:43 +01:00
7af8660355 Also set tmux navigation flag on FocusGained
Make using the `@vim$TMUX_PANE` window flag much more robust by
unsetting it every time the zsh prompt is drawn and setting it again
using a `FocusGained` `autocmd` in vim. This removes the need for the
hacky check for zsh in the conditional defined in the `in_vim` variable.
2019-08-16 21:58:38 +01:00
1f07473b57 Use tmux window option for pane change detection
Improve tmux integration when changing buffers or panes when vim was
invoked by another process so that seamless navigation works when the
`vim$TMUX_PANE` window option has been set, not only when the pane's
command matches a simple regex.
2019-08-11 18:58:55 +01:00
1e47926465 Don't add conflict marker highlight in help files 2019-07-24 13:57:22 +01:00
2faa156aae Only add help autocmd's in help buffers 2019-06-10 10:23:34 +01:00
856c66e150 Add :TodoFile command to find TODOs
Find all TODOs in the current file and populate the location list with
the results.
2019-06-05 11:32:59 +01:00
72fe59ffaa Only invoke last change substitution in help files
Previously the `autocmd` to replace the date on the first line if `Last
change: ` was present resulted in the cursor being moved in non `help`
filetypes due to the substitution failing. Now the substitution is only
attempted if the current file is a `help` file.
2019-04-04 16:53:46 +01:00
bdea77f86a Auto update Last change in vim help files 2019-03-31 23:17:02 +01:00
01b027b5ac Support snippet templates and add help snippets
Add `autocmd` to automatically expand the `_template` snippet on the
`BufNewFile` event, if the expansion fails because the `_template`
snippet does not exist for the current `filetype` undo the changes. Do
the same thing when the `filetype` changes to `help`, since these are
`text` files to begin with the first `autocmd` has no effect.
2019-03-31 15:04:08 +01:00
65c219c98d Add todo.md template 2019-03-30 20:13:28 +00:00
ab0b81b6de Remove .env/.out filetype detection 2019-03-27 14:51:57 +00:00
b493ad17e5 Make minpac commands have consistent format 2019-02-21 11:47:23 +00:00
d555afe61e Move minpac command into plugin/commands.vim 2019-02-21 11:46:28 +00:00
eab3090da7 Add termdebug window selection mappings 2018-12-13 16:13:12 +00:00
51621e8134 Remove vim-plug and use minpac
* Add `Pack`, `PackUpdate`, `PackStatus` and `PackClean` commands to
  manage plugins.
* Don't load `minpac` by default.
* Remove `vim-plug` completely.
2018-11-30 19:41:21 +00:00
3a60c0abcf Improve static_assert snippet & increase sync minlines 2018-11-30 17:46:46 +00:00
d3a8920bf7 Set viminfofile to ~/.cache/vim/info 2018-10-19 12:01:03 +01:00
992096a2a0 Add :Debug command
The :Debug command quickly starts a new debugging sessions.

* adds the `termdebug` package
* invokes `TermdebugCommand` with the given arguments
2018-09-14 16:17:09 +01:00
c80ddd3617 Add mapping to rename include guards in c/cpp 2018-09-07 22:13:29 +01:00
6fb2f7a01c Remove cursorline option 2018-08-30 23:37:28 +01:00
3777a990f2 Show cursor line with different highlight group 2018-08-26 10:51:11 +01:00
f7d07f23da Add TODO's for :LStripLines 2018-08-26 10:51:11 +01:00
ca84ee59ed Actually enable relative number when available 2018-08-26 10:51:11 +01:00
7ace086458 Don't match non conflict markers 2018-08-26 10:51:11 +01:00
fe197a4c76 Add conflict marker highlights as TODO's
For all filetype's highlight conflict markers with the Todo highlight
group and leave trailing text as before. This makes conflict markers
very obvious, in C/C++ where I have operator highlighting conflict
markers are not longer highlighted as operators.
2018-08-26 10:51:11 +01:00
5380ea7c78 Remove relativenumber autocmds
These kept disabling relativenumber when editing which was annoying.
2018-08-26 10:51:11 +01:00
bc014309ef Remove vim-sensible
vim-sensible includes and old matchit.vim which interfears with
vim-matchup and sets some defaults which are then overridden in
plugins/settings.vim. Remove vim-sensible and document the retained
settings.
2018-08-26 10:51:11 +01:00
0416a42e08 Support changing cursor shape for iTerm2 in tmux 2018-08-26 10:51:11 +01:00
eebe101050 Fix vim cursor shape after tmux terminal-overrides 2018-08-26 10:51:11 +01:00
d8ad04297b Use tmux terminal-override for cursor shape on VTE 2018-08-26 10:51:11 +01:00
87d78f9c7a Move relevant settings closer together 2018-08-26 10:50:08 +01:00