Change the `K` normal mode overrides to use the example given in the
coc.nvim README file which uses Vim's builtin help when in `vim` or
`help` files, or checks if coc.nvim is ready and invokes
`CocActionAsync('doHover')`, otherwise fallback to using `keywordprg`.
Vim's :terminal feels much more ergonomic, adding various mappings to
make the experience more similar, mainly by adding a few `<C-w>`
mappings for the most common actions.
Additionally, disable vim-tmux-navigators default mappings and setup
both normal and terminal mode mappings for `<C-w>{h,j,k,l}` in addition
to the normal mode mappings for `<C-{h,j,j,l}>` to make the pane
switching experience more consistent across all buffer types.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.