First Commit
This is a first dotfiles config. I think I have a lot more to add tho...
This commit is contained in:
		
							
								
								
									
										4
									
								
								vim/.vim/UltiSnips/c.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								vim/.vim/UltiSnips/c.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| snippet pline "print a line" i | ||||
| printf("----------------------------------------\n"); | ||||
| endsnippet | ||||
| 	 | ||||
							
								
								
									
										2
									
								
								vim/.vim/UltiSnips/htmljinja.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								vim/.vim/UltiSnips/htmljinja.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| extends jinja | ||||
| extends html | ||||
							
								
								
									
										49
									
								
								vim/.vim/UltiSnips/markdown_tex.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								vim/.vim/UltiSnips/markdown_tex.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,49 @@ | ||||
| # Md related | ||||
|  | ||||
| snippet check "put a open check box" | ||||
| - [ ] ${1:${VISUAL:item}} $0 | ||||
| endsnippet | ||||
|  | ||||
| # Tex related | ||||
| snippet tex "Inline Latex" i | ||||
| \\\\( ${1:${VISUAL}} \\\\) $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet Tex "Latex block" b | ||||
| \\\\[ | ||||
| 	${1:${VISUAL}} | ||||
| \\\\] | ||||
| $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet bb "mathbb" i | ||||
| \mathbb{${1:${VISUAL:R}}} $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet text "implement text in tex" i | ||||
| \text{ ${1:${VISUAL:text}} } $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet br "break a line in tex mode" i | ||||
| \\\\\\\\ | ||||
| $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet frac "fractions" i | ||||
| \frac{$1}{$2} $0 | ||||
| endsnippet | ||||
|  | ||||
| snippet beg "Beggin and end with the cursor on the type" i | ||||
| \begin{${1:matrix}}} | ||||
| 	${2:${VISUAL}} | ||||
| \end{$1} | ||||
| endsnippet | ||||
|  | ||||
| snippet set "prepare for a set in tex {}" i | ||||
| \\\\{ ${1:${VISUAL:e}} \\\\} $0 | ||||
| endsnippet | ||||
|  | ||||
| priority -1 | ||||
| snippet "(\w+)" "latex default" r | ||||
| \\`!p snip.rv = match.group(1)` $1 | ||||
| endsnippet | ||||
							
								
								
									
										23
									
								
								vim/.vim/compiler/esp.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								vim/.vim/compiler/esp.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| " Vim compiler file modified for llvm esp | ||||
| " Compiler:            	llvm  | ||||
| " Previous Maintainer:  Nikolai Weibull <now@bitwi.se> | ||||
| " Latest Revision:     	2023-10-19  | ||||
| " 						forking by tonitch | ||||
|  | ||||
| if exists("current_compiler") | ||||
|   finish | ||||
| endif | ||||
| let current_compiler = "esp" | ||||
|  | ||||
| let s:cpo_save = &cpo | ||||
| set cpo&vim | ||||
|  | ||||
| let g:ycm_clangd_binary_path="/opt/llvm-esp/esp-clang/bin/clangd" | ||||
| YcmRestartServer | ||||
| let &makeprg="idf.py -C .." | ||||
|  | ||||
| "Should do a CompilerSet One day | ||||
|  | ||||
| let &cpo = s:cpo_save | ||||
| unlet s:cpo_save | ||||
|  | ||||
							
								
								
									
										5
									
								
								vim/.vim/ftplugin/c.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								vim/.vim/ftplugin/c.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | ||||
| " nnoremap <F12> :vert term ./build.sh<CR> | ||||
| " nnoremap <Leader><F12> :execute 'tab term ./'. $prgname<CR> | ||||
|  | ||||
| let $MANPAGER='cat' | ||||
| let $MANWIDTH=(&columns/2-4) | ||||
							
								
								
									
										3
									
								
								vim/.vim/ftplugin/go.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								vim/.vim/ftplugin/go.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| set keywordprg=go\ doc | ||||
| unmap K | ||||
| set makeprg=go\ run\ . | ||||
							
								
								
									
										1
									
								
								vim/.vim/ftplugin/python.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								vim/.vim/ftplugin/python.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| set foldmethod=indent | ||||
							
								
								
									
										61
									
								
								vim/.vim/plugin/Make.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								vim/.vim/plugin/Make.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,61 @@ | ||||
| let s:making = 0 | ||||
|  | ||||
| command -nargs=* Make call s:make(<q-args>) | ||||
|  | ||||
| function s:make(args) abort | ||||
|  | ||||
| 	if s:making | ||||
| 		if bufwinid(s:make_buf) == -1 | ||||
| 			" show making buffer | ||||
| 			exe 'sbuffer' s:make_buf | ||||
| 			wincmd p | ||||
| 		else | ||||
| 			"hide making buffer | ||||
| 			exe printf('%d wincmd q', bufwinnr(s:make_buf)) | ||||
| 		endif | ||||
| 		return | ||||
| 	endif | ||||
|  | ||||
| 	" delete last result | ||||
| 	if exists('s:make_buf') && bufexists(s:make_buf) | ||||
| 		silent! exe 'bdelete' s:make_buf | ||||
| 	endif | ||||
|  | ||||
| 	"spawn new make | ||||
| 	let cmd = &makeprg  | ||||
| 	if !empty(a:args) | ||||
| 		let cmd .= ' ' . a:args | ||||
| 	endif | ||||
|  | ||||
| 	let options = {'close_cb': function('s:make_callback'), 'term_rows': 16} | ||||
|  | ||||
| 	let s:make_buf = term_start(cmd, options) | ||||
| 	let s:making = 1 | ||||
|  | ||||
| 	wincmd p | ||||
| endfunction | ||||
|  | ||||
| func s:make_callback(channel) | ||||
|  | ||||
|   " look, you can not get buffer content directly here. | ||||
|   call timer_start(10, function('s:make_callback_impl')) | ||||
| endfunction | ||||
|  | ||||
| function s:make_callback_impl(timer) abort | ||||
|  | ||||
|   exe 'cgetbuffer' s:make_buf | ||||
|  | ||||
|   " consider entry with num zero bufnr and lnum an error or warning | ||||
|   let qfl = filter(getqflist(), {k,v -> v.bufnr != 0 && v.lnum != 0}) | ||||
|  | ||||
|   if empty(qfl) | ||||
|     echo "make successful" | ||||
|   else | ||||
|     echohl WarningMsg | ||||
|     echom printf('found %d qf entries', len(qfl)) | ||||
|     echohl None | ||||
|   endif | ||||
|  | ||||
|   let s:making = 0 | ||||
|  | ||||
| endfunction | ||||
							
								
								
									
										6
									
								
								vim/.vim/vimfile/after/syntax/html.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								vim/.vim/vimfile/after/syntax/html.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| syn region djangotagmarkers start="{{" end="}}" | ||||
| syn region djangovariablemarkers start="{%" end="%}" | ||||
| command! -nargs=+ HiLink hi def link <args> | ||||
| HiLink djangotagmarkers PreProc | ||||
| HiLink djangovariablemarkers PreProc | ||||
| delcommand HiLink | ||||
							
								
								
									
										194
									
								
								vim/.vimrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										194
									
								
								vim/.vimrc
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,194 @@ | ||||
| autocmd Filetype python noremap <F11> <ESC>:vert term python -i %<CR> | ||||
| autocmd Filetype python noremap <F12> <ESC>:vert term python %<CR>  | ||||
|  | ||||
| autocmd Filetype tex noremap <silent> <F12> <ESC>:silent !pdflatex % && mupdf %:r.pdf&<CR> | ||||
|  | ||||
| autocmd FileType asm noremap <F12> <ESC>:execute 'silent !qtspim' expand('%::p')<CR> | ||||
|  | ||||
| " autocmd FileType python set sw=4 | ||||
| " autocmd FileType python set ts=4 | ||||
| " autocmd FileType python set sts=4 | ||||
|  | ||||
| " let g:AutoPairsMapCR = 0 "Workaround for 27_AutoPairsReturn | ||||
| " imap <silent><CR> <CR><Plug>AutoPairsReturn | ||||
|  | ||||
| nnoremap <C-p> :GFiles<CR> | ||||
| nnoremap <C-g> :Ag<CR> | ||||
|  | ||||
| nnoremap <leader><CR> :vert term<CR> | ||||
|  | ||||
| let python_highlight_all=1 | ||||
| let g:pymode_python = 'python3' | ||||
| let g:pymode_options_max_line_length = 120 | ||||
| " let g:ctrlp_cmd = 'CtrlPTag' | ||||
| let g:htmljinja_disable_detection = 1 | ||||
| let g:vimtex_grammar_vlty = {'lt_command': 'languagetool'} | ||||
| let g:vimtex_grammar_textidote = {'jar': '/usr/share/java/textidote.jar'} | ||||
|  | ||||
| let g:vimtex_view_method = 'mupdf' | ||||
|  | ||||
| " nnoremap <c-p> <plug>(YCMFindSymbolInDirectory) | ||||
| " nnoremap <c-P> <plug>(YCMFindSymbolInWorkspace) | ||||
|  | ||||
| function ManPage(expr) | ||||
| 	execute 'silent vert term' &keywordprg a:expr | ||||
| endfunction | ||||
|  | ||||
| nnoremap gd :YcmCompleter GoToDefinition<CR> | ||||
| nnoremap gr :YcmCompleter GoToReferences<CR> | ||||
| nnoremap K :YcmCompleter GetDoc<CR> | ||||
| nnoremap <F12> :Make<CR> | ||||
| nnoremap <leader><F12> :Make run<CR> | ||||
|  | ||||
| "Documentation | ||||
| " nnoremap K :execute 'Man' expand('<cexpr>')<cr> | ||||
| command Curl :execute 'vert term lynx -dump' escape(@+, '#') | ||||
| command OpenLink :silent w !urlscan | ||||
| command -nargs=? Man call fzf#run(fzf#wrap({'source': 'whatis ' .  shellescape(<q-args>) . '| sed -r "s/(^\w*)\s\((.*)\).*/\2 \1/"', 'sink': function('ManPage') , 'options': ['--preview', 'MANPAGER=cat MANWIDTH='.  (&columns/2-4) .' man {1} {2}']})) | ||||
|  | ||||
| " AgIn: Start ag in the specified directory | ||||
| " | ||||
| " e.g. | ||||
| "   :AgIn .. foo | ||||
| function! s:ag_in(bang, ...) | ||||
|   let start_dir=expand(a:1) | ||||
|  | ||||
|   if !isdirectory(start_dir) | ||||
|     throw 'not a valid directory: ' .. start_dir | ||||
|   endif | ||||
|   " Press `?' to enable preview window. | ||||
|   call fzf#vim#ag(join(a:000[1:], ' '), fzf#vim#with_preview({'dir': start_dir}, 'up:50%:hidden', '?'), a:bang) | ||||
|  | ||||
| endfunction | ||||
|  | ||||
| command! -bang -nargs=+ -complete=dir AgIn call s:ag_in(<bang>0, <f-args>) | ||||
|  | ||||
| let g:UltiSnipsExpandTrigger="<c-l>" | ||||
| let g:UltiSnipsListSnipets="<c-h>" | ||||
| let g:UltiSnipsEditSplit="vertical" | ||||
|  | ||||
| let g:cpp_attributes_highlight = 1 | ||||
|  | ||||
| let g:ycm_always_populate_location_list = 1 | ||||
| let g:ycm_goto_buffer_command = "'split-or-existing-window'" | ||||
| let g:ycm_java_binary_path = "/usr/lib/jvm/java-17-openjdk/bin/java" | ||||
|  | ||||
| " let g:completor_clang_binary = "/usr/bin/clang" | ||||
| "fold with space | ||||
| nnoremap <space> za | ||||
| syntax on | ||||
|  | ||||
| set nu | ||||
| set rnu | ||||
| set hls | ||||
| set tabstop=4 | ||||
| set shiftwidth=4 | ||||
| set encoding=utf-8 | ||||
| set nocompatible | ||||
| set ignorecase | ||||
| set nowrap | ||||
| set splitbelow splitright | ||||
| set spelllang+=fr | ||||
| set foldmethod=syntax | ||||
| set foldlevel=99 | ||||
| set incsearch | ||||
| set autochdir | ||||
| " set foldcolumn=1 | ||||
| set clipboard^=unnamed,unnamedplus | ||||
| set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:· | ||||
| set concealcursor= | ||||
| set conceallevel=2 | ||||
| set mouse=a | ||||
|  | ||||
| color desert  | ||||
| hi Normal ctermfg=None ctermbg=None | ||||
| hi NonText ctermfg=None ctermbg=None | ||||
|  | ||||
| packadd termdebug | ||||
|  | ||||
| filetype off | ||||
| set rtp+=$HOME/.vim/bundle/vundle.vim/ | ||||
| call vundle#begin() | ||||
|  | ||||
| "Mandatory | ||||
| Plugin 'vundleVim/Vundle.vim'		"plugin Manager | ||||
|  | ||||
| "Quality of life (any)  | ||||
| Plugin 'itchyny/lightline.vim'		"status bar | ||||
| Plugin 'kien/rainbow_parentheses.vim'	"Better Raimbow Parentheses | ||||
| Plugin 'mhinz/vim-startify'		"start screen  | ||||
| Plugin 'lilydjwg/colorizer'		"color hexcode | ||||
| Plugin 'jiangmiao/auto-pairs'		"auto Pair Brackets | ||||
| " Plugin 'Yggdroot/indentLine'		"show indent - bugging conceal | ||||
| Plugin 'szw/vim-maximizer' | ||||
| " Plugin 'preservim/nerdtree'		"Directory Visulaliser :Nerdtree | ||||
| Plugin 'junegunn/fzf', {'do': { -> fzf#install() }} | ||||
| Plugin 'junegunn/fzf.vim' | ||||
| Plugin 'junegunn/vim-peekaboo'		"see content of register before past for @ C-R and \" | ||||
|  | ||||
| "useful in multiple languages | ||||
| Plugin 'SirVer/ultisnips'		"fast write | ||||
| Plugin 'honza/vim-snippets'		"lib of snips | ||||
| Plugin 'majutsushi/tagbar'		"display tagBar with :TagbarToggle | ||||
| " Plugin 'maralla/completor.vim'		"completion menu | ||||
| " Plugin 'tokorom/completor-shell'	"Add on of completor.vim for shell scripting | ||||
| Plugin 'tpope/vim-commentary'		"comment with <gcc> | ||||
| " Plugin 'dense-analysis/ale'		"Async error checker (test usefulness) | ||||
| Plugin 'puremourning/vimspector'	"Debugger | ||||
|  | ||||
| Plugin 'ycm-core/YouCompleteMe'		"completion tool | ||||
|  | ||||
| "git | ||||
| Plugin 'mhinz/vim-signify'		"git diff show | ||||
| Plugin 'tpope/vim-fugitive'		"for the :Git <command> | ||||
|  | ||||
| "php | ||||
| " Plugin 'StanAngeloff/php.vim'		"php syntax | ||||
| " Plugin 'phpactor/phpactor'		"php auto-completion | ||||
|  | ||||
| "python | ||||
| " Plugin 'python-mode/python-mode'	"A python IDE | ||||
| Plugin 'mitsuhiko/vim-jinja' | ||||
|  | ||||
| "html/css | ||||
| Plugin 'mattn/emmet-vim'		"Fast http | ||||
| Plugin 'vim-scripts/loremipsum'		"ipsum generator :Loremipsum <word> | ||||
| Plugin 'tpope/vim-surround'		"Surround html tags | ||||
| Plugin 'sukima/xmledit'		"Edit XML and HTML | ||||
|  | ||||
| "lua | ||||
| " Plugin 'wsdjeg/vim-lua'			"lua syntax | ||||
|  | ||||
| "markdown | ||||
| Plugin 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vundle'] } | ||||
|  | ||||
| "c & cpp | ||||
| Plugin 'bfrg/vim-cpp-modern'		"Extended vim syntax highlight c++ | ||||
| Plugin 'a.vim'				"go from hpp to cpp with :A | ||||
| " Plugin 'xavierd/clang_complete'		"CLang Complete (don't work with ycm) | ||||
| " Plugin 'ctrlpvim/ctrlp.vim'		"ctrl p support | ||||
| Plugin 'cdelledonne/vim-cmake' | ||||
|  | ||||
| "glsl (shader) | ||||
| Plugin 'tikhomirov/vim-glsl' | ||||
|  | ||||
| "c sharp | ||||
| " Plugin 'OmniSharp/omnisharp-vim' | ||||
|  | ||||
| "java | ||||
|  | ||||
| Plugin 'hdiniz/vim-gradle' | ||||
|  | ||||
| "latex | ||||
|  | ||||
| Plugin 'lervag/vimtex' | ||||
|  | ||||
| "uml | ||||
| Plugin 'weirongxu/plantuml-previewer.vim' | ||||
| Plugin 'tyru/open-browser.vim' | ||||
| Plugin 'aklt/plantuml-syntax' | ||||
|  | ||||
| call vundle#end() | ||||
|  | ||||
| filetype plugin indent on | ||||
| set omnifunc=syntaxcomplete#Complete | ||||
		Reference in New Issue
	
	Block a user