Created
October 31, 2016 09:45
-
-
Save pierremoreau/1fa99bdda563f7e4e6753e9dbae06613 to your computer and use it in GitHub Desktop.
Neovim config file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim Configuration File | |
" Author: Pierre Moreau <dev@pmoreau.org> | |
" Disable Vi compatibility | |
set nocompatible | |
" Set beginning of statusline | |
set statusline=%<%f\ %h%m%r\ \ | |
" Encoding settings | |
set fileencoding=utf-8 | |
set encoding=utf-8 | |
" Indentation settings | |
filetype plugin indent on | |
set expandtab | |
set shiftwidth=2 | |
set shiftround | |
set softtabstop=2 | |
" Viewing settings | |
syntax on | |
set hidden " Hide buffers when opening a new one, rather than closing them | |
set laststatus=2 | |
set modeline | |
set modelines=2 | |
set showcmd | |
set number | |
set showmatch | |
set splitright | |
set splitbelow | |
set list | |
set listchars=tab:>-,trail:¬,nbsp:Ŧ | |
set textwidth=79 | |
set pastetoggle=<F2> | |
autocmd VimResized * wincmd = | |
highlight ColorColumn ctermfg=DarkBlue ctermbg=LightGrey | |
highlight Delimiter ctermfg=Black ctermbg=DarkGreen | |
highlight Comment ctermfg=DarkGreen ctermbg=Black | |
autocmd FileType help wincmd L | |
" Search settings | |
set smartcase | |
set incsearch | |
set hlsearch | |
noremap <CR> :nohlsearch<CR><CR> | |
" Ctags settings | |
set previewheight=6 | |
" Completion settings | |
set wildmode=longest,full | |
set wildmenu | |
set wildignore=*.swp,*.bak,*.pyc,*.class | |
" Enable spell-checking | |
set spell | |
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, | |
" so that you can undo CTRL-U after inserting a line break. | |
inoremap <C-U> <C-G>u<C-U> | |
" Convenient command to see the difference between the current buffer and the | |
" file it was loaded from, thus the changes you made. | |
" Only define it when not defined already. | |
if !exists(":DiffOrig") | |
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | |
\ | wincmd p | diffthis | |
endif | |
" Tags settings | |
map <A-]> :tab split<CR>:exec("tag ".expand("<cword>"))<CR> | |
map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> | |
" Compilation settings | |
nmap <F4> :make<CR> | |
autocmd BufNewFile,BufRead *.gltf set filetype=json | |
autocmd BufNewFile,BufRead *.cudah set filetype=cuda | |
" Chromatica settings | |
let g:chromatica#enable_at_startup=1 | |
let g:chromatica#responsive_mode=1 | |
" lldb.vim settings | |
nmap <M-b> <Plug>LLBreakSwitch | |
nnoremap <F5> :LLmode debug<CR> | |
nnoremap <S-F5> :LLmode code<CR> | |
nnoremap <F8> :LL continue<CR> | |
nnoremap <S-F8> :LL process interrupt<CR> | |
nnoremap <F9> :LL print <C-R>=expand('<cword>')<CR> | |
vnoremap <F9> :<C-U>LL print <C-R>=lldb#util#get_selection()<CR><CR> | |
nnoremap <F10> :LL next<CR> | |
nnoremap <F11> :LL step<CR> | |
" Vim-Fugitive settings | |
autocmd BufReadPost fugitive://* set bufhidden=delete | |
set statusline+=%{fugitive#statusline()} | |
" Set end of statusline | |
set statusline+=%=%-14.(%l,%c%V%)\ %P | |
" Setup vim-plug | |
let s:vim_plug_dir = '$XDG_CONFIG_HOME/nvim/plugged' | |
call plug#begin(s:vim_plug_dir) | |
Plug 'arakashic/chromatica.nvim' | |
Plug 'beyondmarc/glsl.vim' | |
Plug 'fidian/hexmode' | |
Plug 'critiqjo/lldb.nvim' | |
Plug 'tpope/vim-fugitive' | |
call plug#end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment