26 Commits

Author SHA1 Message Date
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
0cd93f1823 Generalise tmux option check 2020-12-31 18:22:37 +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
d960053dfc Add :BuildDir to select YouCompleteMe build directory 2020-10-06 17:12:06 +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
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
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
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
c326a04f70 Don't use normal mode mappings in vimscript 2018-09-14 16:37:14 +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
f7d07f23da Add TODO's for :LStripLines 2018-08-26 10:51:11 +01:00
1db9ea30ee Enable cursor shape changes by default 2018-08-26 10:50:08 +01:00
4c2d9b8089 Add do#cursor_escape_sequences()
Control the cursor shape based on the current mode.
2018-08-26 10:50:08 +01:00
4040dc7508 Move rarely used functions to autoload 2018-08-26 10:50:08 +01:00
e049445284 Remove autocmd to right string white space 2018-08-26 10:50:08 +01:00
981cb46c7c Add :ISort vim command 2018-08-26 10:50:08 +01:00
be47e8ec7b Update vim-plug 2018-08-26 10:50:07 +01:00
927889ce74 Remove macro_mode functions, use vim-replace 2018-08-26 10:49:14 +01:00
ce1d85c7b4 Add macro mode helpers
* Easily {un}map <CR> to @@
* Add macro_mode#{en,dis}able autoload functions
* Add MacroMode{En,Dis}able commands
2018-08-26 10:42:41 +01:00
5b27fcdbb1 Move .vimrc to .vim/vimrc split platform detection 2018-08-26 10:40:44 +01:00
4cf7ce0d32 Update vim-plug 2018-08-26 10:40:44 +01:00
e7b011c367 Final tweak vim-airline theme 2018-08-26 10:40:44 +01:00
1a43d6e810 Tweak colors for vim-airline fresh theme 2018-08-26 10:40:44 +01:00
e3ba637473 Add fresh vim-airline theme 2018-08-26 10:40:44 +01:00
3b1d816705 Add vim-plug script & update .vimrc 2018-08-26 10:36:10 +01:00