Compare commits

...

8 Commits

Author SHA1 Message Date
ab403c69ac 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-03-29 21:22:26 +01:00
fd8e88d28c Remove relativenumber autocmds
These kept disabling relativenumber when editing which was annoying.
2018-03-29 21:21:36 +01:00
27ab5f74b9 Improve Jenkins groovy syntax highlights 2018-03-28 15:31:56 +01:00
f847dae890 Add Doxygen @retval snippet & other improvements 2018-03-28 15:30:38 +01:00
755189dc21 Add extern "C" block snippet 2018-03-15 16:18:31 +00:00
c458adb0f2 Add bool to C string snippet 2018-03-14 17:39:31 +00:00
9a121baa34 Add string_view c++ printf snippet 2018-03-13 12:54:51 +00:00
83bd6baedb Cleanup vim dictionary syntax 2018-03-01 17:00:47 +00:00
6 changed files with 39 additions and 11 deletions

View File

@ -161,3 +161,7 @@ endsnippet
snippet debug "Debug fprintf"
fprintf(stderr, "%s: %d: %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
endsnippet
snippet bs "bool string"
${1:value} ? "true" : "false"
endsnippet

View File

@ -1,9 +1,9 @@
snippet "/// p" "Doxygen parameter block"
/// @param${1/.+/[/}$1${1/.+/]/} $0
/// @param${1/.+/[/}$1${1/.+/]/} ${2:name} $0
endsnippet
snippet "/// t" "Doxygen template parameter block"
/// @tparam $0
/// @tparam ${1:name} $0
endsnippet
snippet "/// b" "Doxygen brief block"
@ -19,6 +19,10 @@ snippet "/// r" "Doxygen return block"
/// @return $0
endsnippet
snippet "/// rv" "Doxygen retval block"
/// @retval \`${1:name}\` $0
endsnippet
snippet "/// n" "Doxygen note block"
/// @note $0
endsnippet

View File

@ -88,3 +88,19 @@ endsnippet
snippet std::printf "std::printf ..."
std::printf("${1:%s}\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/}
endsnippet
snippet printf_sv "printf for std::string_view"
printf("$1: %.*s\n", static_cast<int>(${1:view}.size()), $1.data());$0
endsnippet
snippet externc "extern C block"
#ifdef __cplusplus
extern "C" {
#endif
$0
#ifdef __cplusplus
}
#endif
endsnippet

View File

@ -1,12 +1,15 @@
augroup benieAugroup
" Clear all autocmd's in this group
autocmd!
au BufEnter *.c set relativenumber
au BufLeave *.c set norelativenumber
au BufEnter *.cpp set relativenumber
au BufLeave *.cpp set norelativenumber
" Reopening a file at last curson position
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\ | exe "normal! g'\"" | endif
" TODO: Move this to a plugin & rename to .enter .exit
au BufRead,BufNewFile .env set filetype=zsh
au BufRead,BufNewFile .out set filetype=zsh
" Highlight conflict markers in any filefile
au FileType * :call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\ze.*$')
augroup END

View File

@ -39,7 +39,7 @@ syn match groovyNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\
syn match groovyNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>"
syn match groovyNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>"
syn region groovyComment start='\/\*' end='\*\/' fold
syn match groovyComment '\s*\/\/.*$'
syn match groovyComment '\/\/.*$'
syn match groovyDelimiter '[()\[\]]'
syn region groovyBlock matchgroup=groovyDelimiter start='{' end='}' transparent fold
syn match groovyStructure '\w\+\ze\s*{'
@ -50,7 +50,7 @@ syn region groovyString start=+'+ end=+'+ oneline contains=groovyIdentifier
syn region groovyString start=+'''+ end=+'''+ fold contains=groovyIdentifier
syn match groovyKeywordParam "\w\+\ze\s*=\s*"
syn region groovyFunctionParams matchgroup=groovyDelimiter start='(' end=')' contains=groovyString,groovyIdentifier,groovyNumber,groovyBoolean,groovyKeywordParam transparent
syn region groovyFunctionParams matchgroup=groovyDelimiter start='(' end=')' contains=groovyComment,groovyString,groovyIdentifier,groovyNumber,groovyBoolean,groovyKeywordParam transparent
syn cluster groovySyntax contains=groovyAssert,groovyBlock,groovyBoolean,groovyBranch,groovyClassDecl,groovyComment,groovyConditional,groovyConstant,groovyDelimiter,groovyError,groovyExceptions,groovyExternal,groovyFunction,groovyIdentifier,groovyMethodDecl,groovyNumber,groovyOperator,groovyRepeat,groovyScopeDecl,groovyStatement,groovyStorageClass,groovyString,groovyStructure,groovyType,groovyTypedef,groovyUserLabelRef

7
vimrc
View File

@ -127,9 +127,10 @@ if !platform#is_windows()
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all --no-update-rc'}
Plug 'junegunn/fzf.vim'
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit' }
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\ }
endif
Plug 'kbenzie/note.vim'