Add first few dotfiles
This commit is contained in:
commit
2294550a10
7 changed files with 256 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/config/fish/fishd.*
|
10
config/fish/config.fish
Normal file
10
config/fish/config.fish
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/fish
|
||||
set PATH $HOME/.yarn/bin $HOME/.local/bin $PATH
|
||||
|
||||
alias vim nvim
|
||||
alias v nvim
|
||||
|
||||
thefuck --alias | source
|
||||
|
||||
echo
|
||||
neofetch
|
41
config/fish/functions/fish_prompt.fish
Normal file
41
config/fish/functions/fish_prompt.fish
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
set normal (set_color normal)
|
||||
set magenta (set_color magenta)
|
||||
set yellow (set_color yellow)
|
||||
set green (set_color green)
|
||||
set red (set_color red)
|
||||
set gray (set_color -o black)
|
||||
|
||||
# Fish git prompt
|
||||
set __fish_git_prompt_showdirtystate 'yes'
|
||||
set __fish_git_prompt_showstashstate 'yes'
|
||||
set __fish_git_prompt_showuntrackedfiles 'yes'
|
||||
set __fish_git_prompt_showupstream 'yes'
|
||||
set __fish_git_prompt_color_branch yellow
|
||||
set __fish_git_prompt_color_upstream_ahead green
|
||||
set __fish_git_prompt_color_upstream_behind red
|
||||
|
||||
# Status Chars
|
||||
#set __fish_git_prompt_char_dirtystate '⚡'
|
||||
set __fish_git_prompt_char_dirtystate 'D'
|
||||
|
||||
set __fish_git_prompt_char_stagedstate '→'
|
||||
set __fish_git_prompt_char_untrackedfiles '☡'
|
||||
set __fish_git_prompt_char_stashstate '↩'
|
||||
set __fish_git_prompt_char_upstream_ahead '+'
|
||||
set __fish_git_prompt_char_upstream_behind '-'
|
||||
|
||||
|
||||
function fish_prompt
|
||||
set last_status $status
|
||||
|
||||
set_color -o $fish_color_cwd
|
||||
printf '%s' (prompt_pwd)
|
||||
set_color normal
|
||||
|
||||
printf '%s' (__fish_git_prompt)
|
||||
set_color normal
|
||||
|
||||
echo -en " "
|
||||
end
|
3
config/fish/functions/man.fish
Normal file
3
config/fish/functions/man.fish
Normal file
|
@ -0,0 +1,3 @@
|
|||
function man
|
||||
nvim -c "Man $argv" -c 'silent only'
|
||||
end
|
4
config/nvim/.netrwhist
Normal file
4
config/nvim/.netrwhist
Normal file
|
@ -0,0 +1,4 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhist_cnt =2
|
||||
let g:netrw_dirhist_1='/home/sijmen/Documents/via'
|
||||
let g:netrw_dirhist_2='/home/sijmen/Documents/via/viapos_server'
|
194
config/nvim/init.vim
Normal file
194
config/nvim/init.vim
Normal file
|
@ -0,0 +1,194 @@
|
|||
call plug#begin("~/.nvim/bundle")
|
||||
|
||||
" UI
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'tomasiser/vim-code-dark'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'sjl/gundo.vim'
|
||||
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
|
||||
" Ergonomics
|
||||
Plug 'haya14busa/incsearch.vim'
|
||||
|
||||
" Programming helpers
|
||||
Plug 'tpope/vim-sleuth'
|
||||
Plug 'majutsushi/tagbar'
|
||||
|
||||
" Language support
|
||||
Plug 'mitsuhiko/vim-jinja'
|
||||
Plug 'tikhomirov/vim-glsl'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'cespare/vim-toml'
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
Plug 'posva/vim-vue'
|
||||
Plug 'scrooloose/syntastic'
|
||||
|
||||
" Other
|
||||
Plug 'guns/xterm-color-table.vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" Misc
|
||||
set mouse=a
|
||||
set nowrap
|
||||
set shell=zsh
|
||||
set scrolloff=5
|
||||
set ruler
|
||||
set backspace=2
|
||||
set cursorline
|
||||
set hidden
|
||||
set wildmenu
|
||||
set wildmode=longest:full
|
||||
set splitright
|
||||
set splitbelow
|
||||
let &colorcolumn="+".join(range(1, 255), ",+")
|
||||
let mapleader=","
|
||||
set termguicolors
|
||||
nnoremap <F4> :buffers<CR>:buffer<Space>
|
||||
|
||||
" Gundo
|
||||
nnoremap <F9> :GundoToggle<CR>
|
||||
|
||||
" Tagbar
|
||||
nmap <silent> <F8> :TagbarOpenAutoClose<CR>
|
||||
let g:tagbar_sort = 0
|
||||
|
||||
" Airline
|
||||
set laststatus=2
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
|
||||
let g:airline_theme = 'codedark'
|
||||
let g:airline_left_sep = ' '
|
||||
let g:airline_left_alt_sep = '| '
|
||||
let g:airline_right_sep = ''
|
||||
let g:airline_right_alt_sep = '|'
|
||||
let g:airline_symbols.branch = ''
|
||||
let g:airline_symbols.readonly = ''
|
||||
let g:airline_symbols.linenr = ''
|
||||
let g:airline_symbols.maxlinenr = ''
|
||||
let g:airline_symbols.whitespace = 'Ξ'
|
||||
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#left_sep = ''
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
let g:airline#extensions#tabline#show_tab_nr = 0
|
||||
let g:airline#extensions#tabline#show_tab_type = 0
|
||||
|
||||
" Syntax coloring
|
||||
syntax enable
|
||||
set synmaxcol=1024
|
||||
set background=dark
|
||||
colorscheme codedark
|
||||
hi WarningMsg ctermbg=0
|
||||
hi YcmErrorSign ctermbg=18 ctermfg=1
|
||||
hi YcmWarningSign ctermbg=18 ctermfg=3
|
||||
|
||||
" indentLine
|
||||
let g:indentLine_color_term = 20
|
||||
let g:indentLine_char = '│'
|
||||
let g:indentLine_concealcursor = ''
|
||||
let g:indentLine_indentLevel = 25
|
||||
let g:indentLine_fileType = ['vhdl']
|
||||
|
||||
" Startify
|
||||
let g:startify_session_dir = $HOME . '/.nvim/sessions'
|
||||
let g:startify_session_autoload = 1
|
||||
let g:startify_session_persistence = 1
|
||||
|
||||
" Formatting
|
||||
set encoding=utf-8
|
||||
set tabstop=8
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set autoindent
|
||||
set cino=:0
|
||||
au FileType text,markdown setlocal textwidth=80
|
||||
au FileType python setlocal textwidth=79
|
||||
nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR> " Trim trailing spaces
|
||||
set list listchars=tab:\ \ ,trail:•,precedes:…,extends:…
|
||||
|
||||
" Line numbering
|
||||
set number
|
||||
|
||||
" Search
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
map / <Plug>(incsearch-forward)
|
||||
map ? <Plug>(incsearch-backward)
|
||||
map g/ <Plug>(incsearch-stay)
|
||||
|
||||
set hlsearch
|
||||
let g:incsearch#auto_nohlsearch = 1
|
||||
map n <Plug>(incsearch-nohl-n)
|
||||
map N <Plug>(incsearch-nohl-N)
|
||||
map * <Plug>(incsearch-nohl-*)
|
||||
map # <Plug>(incsearch-nohl-#)
|
||||
map g* <Plug>(incsearch-nohl-g*)
|
||||
map g# <Plug>(incsearch-nohl-g#)
|
||||
|
||||
" Undos
|
||||
set undofile
|
||||
set undodir=~/.nvim/undo
|
||||
set undolevels=1000
|
||||
set undoreload=10000
|
||||
|
||||
" Completion
|
||||
set completeopt=menu,menuone,longest,preview
|
||||
let g:ycm_confirm_extra_conf = 0
|
||||
let g:ycm_autoclose_preview_window_after_completion = 1
|
||||
let g:ycm_complete_in_comments = 1
|
||||
let g:ycm_seed_identifiers_with_syntax = 1
|
||||
let g:ycm_python_binary_path = 'python'
|
||||
|
||||
" Shortcuts
|
||||
"nnoremap <silent> <F4> :wa<CR>:split<CR>:terminal make run<CR>
|
||||
vnoremap <C-y> "+y
|
||||
inoremap <C-p> <ESC>"+pa
|
||||
map <silent> <F2> :set invpaste<CR>
|
||||
if has("nvim")
|
||||
tnoremap <A-h> <C-\><C-n><C-w>h
|
||||
tnoremap <A-j> <C-\><C-n><C-w>j
|
||||
tnoremap <A-k> <C-\><C-n><C-w>k
|
||||
tnoremap <A-l> <C-\><C-n><C-w>l
|
||||
endif
|
||||
nnoremap <A-h> <C-w>h
|
||||
nnoremap <A-j> <C-w>j
|
||||
nnoremap <A-k> <C-w>k
|
||||
nnoremap <A-l> <C-w>l
|
||||
nnoremap <silent> <C-t> :tabnew<CR>
|
||||
nnoremap <silent> <C-n> :tabnext<CR>
|
||||
nnoremap <silent> <C-p> :tabprevious<CR>
|
||||
nnoremap <C-[> <C-t>
|
||||
map ; :
|
||||
|
||||
" Cache
|
||||
set backupdir=~/.nvim/backup
|
||||
set directory=~/.nvim/backup
|
||||
|
||||
" Vimpager
|
||||
if exists("vimpager")
|
||||
au BufRead * set scrolloff=0
|
||||
set noruler
|
||||
set nocursorline
|
||||
set colorcolumn=
|
||||
set nonumber
|
||||
au BufRead * set laststatus=0
|
||||
let g:airline#extensions#tabline#enabled = 0
|
||||
endif
|
||||
let vimpager_disable_ansiesc = 1
|
||||
|
||||
" vim-markdown
|
||||
let g:vim_markdown_folding_disabled = 1
|
||||
|
||||
" NerdTree
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
3
gitconfig
Normal file
3
gitconfig
Normal file
|
@ -0,0 +1,3 @@
|
|||
[user]
|
||||
email = me@sijmenschoon.nl
|
||||
name = Sijmen Schoon
|
Loading…
Reference in a new issue