VIM configuration

This commit is contained in:
2023-03-25 23:05:03 +01:00
parent 3a3ed827ee
commit 3aaed93391
3 changed files with 159 additions and 0 deletions

3
vim/filetype.vim Normal file
View File

@@ -0,0 +1,3 @@
augroup filetypedetect
au BufNewFile,BufRead *.ums setf umlspeed
augroup END

51
vim/syntax/umlspeed.vim Normal file
View File

@@ -0,0 +1,51 @@
" Vim syntax file
" Language: UMLSpeed
" Maintainer: Robin Rawson-Tetley <robin@rawsontetley.org>
" Last Change: 2007 May 03
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" UMLSpeed keywords
syn keyword uMeta import namespace
syn keyword uEntity class interface actor usecase classdiagram usecasediagram sequencediagram deploymentdiagram component deployment
syn keyword uCollection operations fields entities visuals contents
syn keyword uRelationship uses extends includes depends implements onetoone onetomany manytomany manytoone creates invokes invokesasync
syn keyword uProperty comment layout modifiers entity_margin documentation name type platform
syn keyword uModifier public private friend abstract component software node database
syn keyword uType void grid satellite hierarchy
syn keyword uTodo contained TODO FIXME XXX
" These are arbitrary types from various languages, just to help remind folks
syn keyword javaTypes Boolean Byte Char Integer Long Float Double String StringBuffer File List Hashmap Hashtable Collection Enum ArrayList Vector
syn keyword cTypes boolean byte char int long float double
syn keyword cSharpTypes string bool
" Regions (strings, comments)
syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell
syn region cCommentS start="/\*" end="\*/" contains=cSpecial,uTodo
syn region cCommentL start="//" skip="\\$" end="$"
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link uMeta Include
hi def link uEntity StorageClass
hi def link uCollection Statement
hi def link uProperty Conditional
hi def link uRelationship Label
hi def link uModifier Label
hi def link uType Type
hi def link uTodo Todo
hi def link cCommentL Comment
hi def link cCommentS Comment
hi def link cString String
hi def link cTypes Type
hi def link cSharpTypes Type
hi def link javaTypes Type
let b:current_syntax = "umlspeed"
" vim: ts=8

105
vimrc Normal file
View File

@@ -0,0 +1,105 @@
"
" PLUGINS IMPORT
""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Vundle management bundle
Bundle 'gmarik/vundle'
Bundle 'The-NERD-Commenter'
Bundle 'vim-airline/vim-airline'
Bundle 'kien/ctrlp.vim'
"Bundle 'ervandew/supertab'
Bundle 'snipMate'
"Bundle 'preservevim/nerdtree'
Bundle 'voldikss/vim-floaterm'
filetype plugin indent on
"
" GLOBALS
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader=","
set t_Co=256
colorscheme elflord
set gfn=terminus
set go=
syntax on
set encoding=utf-8
set hidden
set showcmd
set nowrap
set backspace=indent,eol,start
set autoindent
set copyindent
set number
set shiftround
set ignorecase
set smartcase
set hlsearch
set incsearch
set history=1000
set undolevels=1000
set wildignore=*.swp,*.bak
set title
set visualbell
set noerrorbells
set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.
set ttyfast
set mouse=
set nocompatible
"set backup
"set backupdir=~/.vim_backup
"set noswapfile
set fileformats=unix,dos,mac
set laststatus=2
"set expandtab
set softtabstop=8 tabstop=8 shiftwidth=4
set ruler
set nocompatible
"
" KEYBINDINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""
map cc <leader>c<space>
map # {v}! par 72<CR>
map & {v}! par 72j<CR>
map <F6> :setlocal spell! spelllang=en<CR>
map <F12> :set invhls<CR>
cmap <C-g> <C-u><ESC>
command! -bang W w<bang>
"
" PLUGINS CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:CommandTMaxFiles = 5000
let g:CommandTMaxHeight = 12
"
" SPECIFIC CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Insert date.
iab xdate <c-r>=strftime("%Y/%m/%d %H:%M:%S")<cr>
" What's my name?
iab xname Lionel Sambuc
" Acronyme
iab xac (LSU)
" Default printk
iab xpk printk("(LSU) %s:%i:%s ## %s\n", __FILE__, __LINE__, __func__, "msg");
" Enable folding by indentation
" Use: zc, zo, zC, zO, zR, zM
"set foldmethod=indent
"highlight Folded ctermfg=red
"highlight FoldColumn ctermfg=white
"set fillchars=fold:=