Added tmux config file and the initial configuration for dotdrop

This commit is contained in:
2018-11-25 15:53:25 +01:00
parent ce3fe00115
commit 5a6c00c4e7
3 changed files with 62 additions and 0 deletions

155
dotfiles/nvim/init.vim Normal file
View File

@@ -0,0 +1,155 @@
syntax on
filetype plugin indent on
au BufNewFile,BufRead *.tpp set filetype=cpp
syntax enable
set number showmatch
set shiftwidth=4 tabstop=4 softtabstop=4 expandtab autoindent
let python_highlight_all = 1
:imap jk <Esc>
set hidden
" This fixes a bug in Konsole https://github.com/neovim/neovim/issues/7002
:set guicursor=
" set options for folding
set foldmethod=syntax
set foldlevelstart=20
" put leader to space
map <space> <leader>
map <space><space> <leader><leader>
" airline settings
let g:airline_theme='badwolf'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail'
let g:airline#extensions#whitespace#enabled = 0
" NERDTree
let NERDTreeChDirMode = 2
let NERDTreeQuitOnOpen = 1
" Custom key bindings general
nmap <leader>n :NERDTreeToggle <CR>
map <leader>t :TagbarToggle <CR>
map <leader>u :MundoToggle <CR>
nnoremap <leader>l <C-w>l
tnoremap <Esc> <C-\><C-n>
noremap <Esc> <Esc>:noh <CR>
nnoremap <F4> :call vimterm#toggle() <CR>
tnoremap <F4> <C-\><C-n>:call vimterm#toggle() <CR>
" YouCompleteMe settings
let g:ycm_confirm_extra_conf = 0 "Stop asking me every time to confirm
nnoremap <leader>gl :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>gf :YcmCompleter GoToDefinition<CR>
nnoremap <leader>gg :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <leader>gd :YcmCompleter GetDoc<CR>
" Fix colors of YCM
highlight YcmWarningLine guibg=Cyan ctermbg=Cyan
highlight YcmWarningSign guibg=Cyan ctermbg=Cyan
highlight YcmWarningSection guibg=Cyan ctermbg=Cyan
highlight YcmErrorSection guibg=Red ctermbg=Red
highlight YcmErrorLine guibg=Red ctermbg=Red
highlight YcmErrorSign guibg=Red ctermbg=Red
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
" Other colors
hi Search ctermfg=232 ctermbg=154 guifg=#141413 guibg=#aeee00
" Custom function to Toggle Tagbar and NERDTree
let s:hidden_all = 0
function! ToggleHiddenAll()
NERDTreeToggle
wincmd l
TagbarToggle
endfunction
nnoremap <silent> <leader>; :call ToggleHiddenAll()<CR>
" Rust debugging
let g:ycm_rust_src_path = '/home/dennis/code/rust/src'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_rust_checkers = ['cargo']
" Indent settings
let g:indentLine_char = '┆'
let g:indentLine_color_term = 239
call plug#begin()
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
" general
Plug 'majutsushi/tagbar'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
Plug 'simnalamburt/vim-mundo', {'on': 'MundoToggle'}
Plug 'wvffle/vimterm'
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --rust-completer' }
Plug 'rdnetto/YCM-generator', { 'branch': 'stable'}
Plug 'chrisbra/Recover.vim'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-surround'
Plug 'Shougo/denite.nvim'
Plug 'editorconfig/editorconfig-vim'
" versioning
Plug 'tpope/vim-fugitive'
" python
Plug 'bfredl/nvim-ipy'
" rust
Plug 'rust-lang/rust.vim'
Plug 'vim-syntastic/syntastic'
" debugging
Plug 'sakhnik/nvim-gdb'
call plug#end()
" Denite settings
nnoremap <space>e :Denite file_rec <cr>
call denite#custom#map(
\ 'insert',
\ '<C-j>',
\ '<denite:move_to_next_line>',
\ 'noremap'
\)
call denite#custom#map(
\ 'insert',
\ '<C-k>',
\ '<denite:move_to_previous_line>',
\ 'noremap'
\)
call denite#custom#filter('matcher_ignore_globs', 'ignore_globs', [ '.git/', '.gradle/', 'build/', '.idea/', 'app/', '*.png', '*.so', '*.a', '*.jar', 'target/' ])
call denite#custom#source('file_rec', 'matchers', ['matcher_ignore_globs', 'matcher/fuzzy'])

32
dotfiles/tmux.conf Normal file
View File

@@ -0,0 +1,32 @@
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set-option -g status-position top
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# prevent issues with (n)vi(m)
set -s escape-time 0
# don't rename windows automatically
set-option -g allow-rename off
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D