6 Commits

Author SHA1 Message Date
tforgione 7bbf9b8c9b Update init.vim 2023-10-11 10:01:55 +02:00
tforgione f1ee5b1aff Restore old init.vim 2022-12-07 12:45:51 +01:00
tforgione db37bf1d54 u=update 2022-07-02 14:32:37 +02:00
tforgione f2ddfa9590 Adds path 2022-07-02 14:32:05 +02:00
tforgione e767ecead0 Arrows 2022-07-02 13:38:53 +02:00
tforgione 9a6bc3197e Update bashrc 2022-07-02 13:37:27 +02:00
2 changed files with 169 additions and 204 deletions
+7 -1
View File
@@ -62,7 +62,7 @@ if [ "$color_prompt" = yes ]; then
else else
color="\033[1;35m" color="\033[1;35m"
fi fi
PS1="${color}── \u\033[33m::\033[34m\w\033[0m\n${color}╰▶ \033[0m" PS1="${color}── \u\033[33m::\033[34m\w\033[0m\n${color}└▷ \033[0m"
else else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi fi
@@ -88,6 +88,12 @@ alias ll='ls -alF'
alias la='ls -A' alias la='ls -A'
alias l='ls -CF' alias l='ls -CF'
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
export PATH=~/.config/dotfiles/bin/:$PATH
alias u=update
# Add an "alert" alias for long running commands. Use like so: # Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert # sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
+15 -56
View File
@@ -4,9 +4,6 @@ set nocompatible
" PLUGNIS ###########################################################{{{ " PLUGNIS ###########################################################{{{
call plug#begin() call plug#begin()
" Conquer of Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" General plugins " General plugins
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
@@ -16,6 +13,7 @@ Plug 'tpope/vim-abolish'
" Language specific plugins " Language specific plugins
" Rust " Rust
Plug 'rust-lang/rust.vim' Plug 'rust-lang/rust.vim'
@@ -28,9 +26,6 @@ Plug 'cespare/vim-toml'
" Pug " Pug
Plug 'digitaltoad/vim-pug' Plug 'digitaltoad/vim-pug'
" Spandex
Plug 'rust-spandex/spandex.vim'
call plug#end() call plug#end()
" Line numbers and syntaxic coloration " Line numbers and syntaxic coloration
@@ -45,7 +40,6 @@ set expandtab
set tabstop=4 set tabstop=4
set shiftwidth=4 set shiftwidth=4
set autoindent set autoindent
set tw=120
" }}} " }}}
" UI CONFIG #########################################################{{{ " UI CONFIG #########################################################{{{
@@ -147,57 +141,22 @@ let g:markdown_composer_browser = 'firefox'
let g:instant_markdown_autostart = 0 let g:instant_markdown_autostart = 0
" }}} " }}}
" COC CONFIG ########################################################{{{ function! s:check_back_space() abort
let col = col('.') - 1
" Use `[g` and `]g` to navigate diagnostics return !col || getline('.')[col - 1] =~ '\s'
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> gp <Plug>(coc-diagnostic-prev)
nmap <silent> gn <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction endfunction
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
" Autoclose preview
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
" Complete on tab
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" }}}
" CUSTOM THINGS DEPENDING ON ENV ####################################{{{ " CUSTOM THINGS DEPENDING ON ENV ####################################{{{
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
let g:ale_linters = {}
let g:ale_c_parse_compile_commands=1
let g:ale_elm_ls_use_global = 1
let g:ale_linters_ignore = { 'elm': ['make'] }
let g:ale_lint_on_text_changed = 0
if $NVIM_DISABLE_PYTHON_LINTER == '1'
let g:ale_linters.python = []
endif
if $NVIM_DISABLE_JAVA_LINTER == '1'
let g:ale_linters.java = []
endif