aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2024-05-09 19:22:20 +0200
committerOxbian <got.dacs@slmail.me>2024-05-09 19:22:20 +0200
commitf63208096bd0b5623692839a7091e99008ef5e0a (patch)
treed20b94de37d451ff498427fa5ff14c9f98cf1bb8 /vim
parent583cee5d527698baebfa1ee4845c1a1ebbcf2453 (diff)
downloadvimrc-f63208096bd0b5623692839a7091e99008ef5e0a.tar.gz
vimrc-f63208096bd0b5623692839a7091e99008ef5e0a.zip
FIX: symlink glitch + removing unused plugins from README
Diffstat (limited to 'vim')
-rw-r--r--vim/after/ftplugin/markdown.vim1
-rw-r--r--vim/after/ftplugin/python.vim30
-rw-r--r--vim/keymaps.vim187
-rw-r--r--vim/options.vim82
-rw-r--r--vim/plugins.vim131
-rw-r--r--vim/spell/en.utf-8.add11
-rw-r--r--vim/spell/en.utf-8.add.splbin211 -> 0 bytes
-rw-r--r--vim/spell/fr.utf-8.splbin571627 -> 0 bytes
-rw-r--r--vim/spell/fr.utf-8.sugbin2324315 -> 0 bytes
9 files changed, 0 insertions, 442 deletions
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
deleted file mode 100644
index bcda2dd..0000000
--- a/vim/after/ftplugin/markdown.vim
+++ /dev/null
@@ -1 +0,0 @@
-setlocal spell
diff --git a/vim/after/ftplugin/python.vim b/vim/after/ftplugin/python.vim
deleted file mode 100644
index 41b1d88..0000000
--- a/vim/after/ftplugin/python.vim
+++ /dev/null
@@ -1,30 +0,0 @@
-" Python
-let g:lsp_settings = {}
-let g:lsp_settings['pylsp-all'] =
- \ {
- \ 'workspace_config': {'pylsp-all': {
- \ 'configurationSources': ['flake8'],
- \ 'plugins': {
- \ 'pyflakes' : {'enabled': v:false},
- \ 'flake8': {'enabled': v:true},
- \ 'mypy-ls': {'enabled': v:true, 'live_mode': v:false},
- \ 'pylint': {'enabled': v:true},
- \ 'pydocstyle': {'enabled': v:true},
- \ 'pyls_isort': {'enabled': v:true},
- \ 'autopep8': {'enabled': v:false},
- \ 'yapf': {'enabled': v:false},
- \ 'black': {'enabled': v:true},
- \ }
- \ }}
- \ }
-
-" Define a custom function that executes :LspDocumentFormat and :!isort
-if !exists('*FormatPythonFile')
- function! FormatPythonFile()
- silent execute '!black %'
- silent execute '!isort %'
- endfunction
-endif
-" Remap the custom function to <leader>ldf
-nnoremap <leader>ldf :call FormatPythonFile()<CR>
-
diff --git a/vim/keymaps.vim b/vim/keymaps.vim
deleted file mode 100644
index d68b8c4..0000000
--- a/vim/keymaps.vim
+++ /dev/null
@@ -1,187 +0,0 @@
-"""""""""""""""""""""""""""""
-" Keymaps
-"""""""""""""""""""""""""""""
-
-let g:mapleader = "\<Space>"
-let g:maplocalleader = ','
-nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
-nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
-
-" Treat long paragraph as a line
-map j gj
-map k gk
-
-""""""""""""""""""""
-" Window movement
-""""""""""""""""""""
-
-" Go to the bottom window
-noremap <C-j> <C-w>j
-
-" Go to the top window
-noremap <C-k> <C-w>k
-
-" Go to the right window
-noremap <C-l> <C-w>l
-
-" Go to the left window
-noremap <C-h> <C-w>h
-
-""""""""""""""""""""""""
-" Remove highlighting
-""""""""""""""""""""""""
-
-nnoremap <leader>hl :nohlsearch<CR>
-
-" Save file
-nnoremap <C-s> :w!<CR>
-
-""""""""""""""""""""""""""
-" Buffer
-"""""""""""""""""""""""""
-
-" Close the current buffer
-noremap <leader>bd :Bclose<cr>:tabclose<cr>gT
-
-" Close all the buffers
-noremap <leader>ba :bufdo bd<cr>
-
-" Go to the next buffer
-noremap <leader>bn :bnext<cr>
-
-" Go to the previous buffer
-noremap <leader>bp :bprevious<cr>
-
-""""""""""""""""""""""""""""
-" Tabs
-"""""""""""""""""""""""""""
-
-" Open a new tab
-noremap <leader>tn :tabnew<cr>
-
-" Close all others tab
-noremap <leader>to :tabonly<cr>
-
-" Close current tab page
-noremap <leader>tc :tabclose<cr>
-
-" Move tabs after another
-noremap <leader>tm :tabmove
-
-" Go to the next tab
-noremap <leader>t<leader> :tabnext<cr>
-
-" Let 'tl' toggle between this and the last accessed tab
-let g:lasttab = 1
-nnoremap <leader>tl :exe "tabn ".g:lasttab<CR>
-au TabLeave * let g:lasttab = tabpagenr()
-
-" Opens a new tab with the current buffer's path
-" Super useful when editing files in the same directory
-noremap <leader>te :tabedit <C-r>=escape(expand("%:p:h"), " ")<cr>/
-
-" Switch CWD to the directory of the open buffer
-noremap <leader>cd :cd %:p:h<cr>:pwd<cr>
-
-" Specify the behavior when switching between buffers
-try
- set switchbuf=useopen,usetab,newtab
- set stal=2
-catch
-endtry
-
-" Return to last edit position when opening files (You want this!)
-au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
-
-""""""""""""""""""""""""
-" Netrw
-"""""""""""""""""""""""
-
-" Toggle tree view
-nnoremap <C-f> :Lexplore<CR>
-
-""""""""""""""""""""
-" GitGutter
-""""""""""""""""""""
-
-let g:gitgutter_enabled=1 " Enable by default gitgutter
-
-" Go to the previous hunk
-nnoremap <leader>hp <Plug>(GitGutterPrevHunk)
-
-" Go to the next hunk
-nnoremap <leader>hn <Plug>(GitGutterNextHunk)
-
-" Enable / Disable GitGutter
-nnoremap <leader>ht <Plug>(GitGutterToggle)
-
-" Stage Hunk in Git
-nnoremap <leader>hs <Plug>(GitGutterStageHunk)
-
-" Undo Hunk
-nnoremap <leader>hu <Plug>(GitGutterUndoHunk)
-
-" Preview Hunk
-nnoremap <leader>hP :GitGutterPreviewHunk<CR>
-
-" Always show the status line
-set laststatus=2
-
-"""""""""""""""""""""
-" Spell
-"""""""""""""""""""""
-
-" Toggle and untoggle spell checking
-noremap <leader>ss :setlocal spell!<cr>
-
-" Next word to spellcheck
-noremap <leader>sn ]s
-
-" Previous word to spellcheck
-noremap <leader>sp [s
-
-" Add word into the spellcheck dictionary
-noremap <leader>sa zg
-
-" show the list of alternatives for the word
-noremap <leader>s? z=
-
-"""""""""""""""""""
-" LSP
-"""""""""""""""""""
-inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
-
-" Make <CR> to accept selected completion item or notify coc.nvim to format
-" <C-g>u breaks current undo, please make your own choice
-inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
- \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
-
-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)
-
-" Use K to show documentation in preview window
-nnoremap <silent> gh :call ShowDocumentation()<CR>
-
-function! ShowDocumentation()
- if CocAction('hasProvider', 'hover')
- call CocActionAsync('doHover')
- else
- call feedkeys('K', 'in')
- endif
-endfunction
-
-" Highlight the symbol and its references when holding the cursor
-autocmd CursorHold * silent call CocActionAsync('highlight')
-
-" Symbol renaming
-nmap <leader>gR <Plug>(coc-rename)
-
-" Formatting selected code
-xmap <leader>gf <Plug>(coc-format-selected)
-nmap <leader>gf <Plug>(coc-format-selected)
diff --git a/vim/options.vim b/vim/options.vim
deleted file mode 100644
index 5e3f11a..0000000
--- a/vim/options.vim
+++ /dev/null
@@ -1,82 +0,0 @@
-" Search options
-set incsearch " Search for partial typed match
-set ignorecase " Search not case sensitive
-set smartcase " Search for pattern if contains uppercase
-set hlsearch " Highlight all match search pattern
-
-" Graphics options
-syntax on " Show syntax color
-set number " Show line number
-set colorscheme=onedark " Set vim theme to onedark
-set colorcolumn=80 " Add an indicator for 80 char limit
-set relativenumber " Show relative line number
-set cursorline " Select the current line
-set showmatch " Show matching brackets when hovered
-set noshowmode " Disable the -- INSERTION -- default comment
-set so=7 " Set 7 lines to the cursor - when moving vertically
-
-" Mouse options
-set mouse=a " Allow the mouse to do all the editing
-
-" Indent options
-set tabstop=4 " Size of a tab
-set shiftwidth=4 " Number of space for each indent
-set softtabstop=0 " Useless indent
-set noexpandtab " Vim will automatically use tab and not spaces
-set smartindent " Do clever indenting
-set copyindent " Copy indent style of the file
-" Automatic options
-set autowrite " Automatically write the file on certain actions
-set autoread " Automatically read external changes on the file
-
-" System
-if has('unnamedplus') " Allow OS & vim clipboard sync
- set clipboard=unnamedplus
-endif
-set undofile " Save undo history
-set history=500 " Max line vim remember
-set updatetime=500 " Delay before vim write swap file, better for gitgutter
-
-" Autocomplete
-set completeopt=menu,menuone,popup,noselect,noinsert " Show a pop up for
- " command completion
-set wildmenu " Turn on wildmenu
-filetype plugin on
-
-" Avoid garbled characters in Chinese language windows OS
-let $LANG='en' " Setting lang as en
-set langmenu=en " Setting menu lang as en
-" This delete all the defined menu
-source $VIMRUNTIME/delmenu.vim
-source $VIMRUNTIME/menu.vim
-
-" Ignore compiled files
-set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
- set wildignore+=.git\*,.hg\*,.svn\*
-else
- set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-endif
-
-" Configure backspace so it acts as it should act
-set backspace=eol,start,indent
-set whichwrap+=<,>,h,l
-
-" Don't redraw while executing macros (good performance config)
-set lazyredraw
-
-" How many tenths of a second to blink when matching brackets
-set mat=2
-
-" Set UTF-8 as standard encoding and en_US as the standard language
-set encoding=utf8
-
-" Use Unix as the standard file type
-set ffs=unix,dos,mac
-
-" Turn backup off, since most stuff is in SVN, git etc. anyway...
-set nobackup
-set noswapfile
-
-" Timeout
-set timeoutlen=500
diff --git a/vim/plugins.vim b/vim/plugins.vim
deleted file mode 100644
index 7dd1f9a..0000000
--- a/vim/plugins.vim
+++ /dev/null
@@ -1,131 +0,0 @@
-""""""""""""""""""""""""""
-" Plugins
-""""""""""""""""""""""""""
-" Install vim-plug if not found
-if empty(glob('~/.vim/autoload/plug.vim'))
- silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-endif
-
-" Run PlugInstall if there are missing plugins
-autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
- \| PlugInstall --sync | source $MYVIMRC
-\| endif
-
-call plug#begin('~/.vim/plugged')
-
-" UI & Themes
-Plug 'joshdick/onedark.vim' " Onedark themes for vim
-Plug 'liuchengxu/vim-which-key' " Show leader mapping cheatsheet
-
-" Git integration
-Plug 'airblade/vim-gitgutter' " Git diff
-
-" Autocompletion, linter, syntax
-Plug 'neoclide/coc.nvim', {'branch': 'release'}
-
-" Tools
-Plug 'wakatime/vim-wakatime' " Wakatime
-Plug 'ap/vim-css-color' " rgb, hex color preview
-
-call plug#end()
-
-filetype plugin indent on " Allow filetype detection, plugins, indentation
-
-"""""""""""""""""""""""""
-" Configuration
-"""""""""""""""""""""""""
-" Netrw (filetree built-in vim)
-let g:netrw_keepdir = 0 " Reload buffer usefull when moving or removing file
-let g:netrw_winsize = 10 " Size of filetree buffer
-let g:netrw_banner = 0 " Removing netrw banner
-let g:netrw_localcopydircmd = 'cp -r' " Changing copy command to add recursive copy
-
-" Statusline
-let g:currentmode={
- \ 'n' : 'NORMAL ',
- \ 'v' : 'VISUAL ',
- \ 'V' : 'V·Line ',
- \ "\<C-V>" : 'V·Block ',
- \ 'i' : 'INSERT ',
- \ 'R' : 'R ',
- \ 'Rv' : 'V·Replace ',
- \ 'c' : 'Command ',
- \}
-set laststatus=2
-set statusline=
-" VIM Mode
-set statusline+=\ %{toupper(g:currentmode[mode()])}%{&spell?'[SPELL]':''}\|
-" File (path, modified, readonly ? )
-set statusline+=%h\ %F
-set statusline+=%{&modified?'\ [+]':''}
-set statusline+=%{&readonly?'\ ':''}
-" Filetype
-set statusline+=%=%y
-set statusline+=\ \|\ %{&fileencoding?&fileencoding:&encoding}
-set statusline+=\ \|\ [%{&fileformat}\]
-" Line count and percentage
-set statusline+=\ \|\ %l:%c
-set statusline+=\ [%p%%]\
-
-
-" Which Key
-call which_key#register('<Space>', "g:which_key_map")
-let g:which_key_map = {}
-
-" Buffer key help
-let g:which_key_map.b = {
- \ 'name' : '+buffer',
- \ 'd' : 'current buffer close',
- \ 'a' : 'close all buffers',
- \ 'n' : 'go to next buffer',
- \ 'p' : 'go to previous buffer',
- \ }
-
-" Tab key help
-let g:which_key_map.t = {
- \ 'name' : '+tab',
- \ 't<leader>' : 'go to next tab',
- \ 'n' : 'open new tab',
- \ 'o' : 'close other tabs',
- \ 'c' : 'close current tab',
- \ 'm' : 'move tab after another',
- \ 'l' : 'switch between this & last tab',
- \ 'e' : 'open new tab with current buffer',
- \ }
-
-" Spell key help
-let g:which_key_map.s = {
- \ 'name' : '+spell',
- \ 's' : 'toggle spell check',
- \ 'n' : 'next spell word',
- \ 'p' : 'previous spell word',
- \ 'a' : 'add word in dict',
- \ '?' : 'list word alternatives',
- \ }
-
-" Hunk key help
-let g:which_key_map.h = {
- \ 'name' : '+git hunk',
- \ 'l' : 'remove highlight',
- \ 'p' : 'go previous hunk',
- \ 'n' : 'go next hunk',
- \ 't' : 'enable/disable gitgutter',
- \ 's' : 'stage hunk',
- \ 'u' : 'undo hunk',
- \ 'P' : 'preview hunk',
- \ }
-
-" LSP key help
-let g:which_key_map.g = {
- \ 'name' : '+LSP',
- \ 'd' : 'go to definition',
- \ 'n' : 'next diagnostic',
- \ 'p' : 'previous diagnostic',
- \ 'r' : 'go to reference',
- \ 'R' : 'rename object',
- \ 'y' : 'type definition',
- \ 'i' : 'go to implementation',
- \ 'h' : 'documentation',
- \ 'f' : 'format document',
- \ }
diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add
deleted file mode 100644
index 283920b..0000000
--- a/vim/spell/en.utf-8.add
+++ /dev/null
@@ -1,11 +0,0 @@
-linters
-nerdtree
-GitGutter
-keybinds
-onedark
-LSP
-vscode
-autocompleter
-linter
-neovim
-untoggle
diff --git a/vim/spell/en.utf-8.add.spl b/vim/spell/en.utf-8.add.spl
deleted file mode 100644
index 29528b3..0000000
--- a/vim/spell/en.utf-8.add.spl
+++ /dev/null
Binary files differ
diff --git a/vim/spell/fr.utf-8.spl b/vim/spell/fr.utf-8.spl
deleted file mode 100644
index ff27132..0000000
--- a/vim/spell/fr.utf-8.spl
+++ /dev/null
Binary files differ
diff --git a/vim/spell/fr.utf-8.sug b/vim/spell/fr.utf-8.sug
deleted file mode 100644
index df555d2..0000000
--- a/vim/spell/fr.utf-8.sug
+++ /dev/null
Binary files differ
ArKa projects. All rights to me, and your next child right arm.