dotfiles

Dash Eclipse's dotfiles
git clone git://ezup.dev/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 3391ff5b870f7de8326ec870e40e5f5546cd1f34
parent ee7da599dc4d98a215c759459ea6c1a2bec75c28
Author: Dash Eclipse <dashezup@disroot.org>
Date:   Thu, 21 Apr 2022 16:01:08 +0000

feat: add .vim/{vimrc,ftplugin/}

Diffstat:
A.vim/ftplugin/c.vim | 4++++
A.vim/ftplugin/css.vim | 3+++
A.vim/ftplugin/html.vim | 3+++
A.vim/ftplugin/json.vim | 4++++
A.vim/ftplugin/php.vim | 4++++
A.vim/ftplugin/python.vim | 4++++
A.vim/ftplugin/sql.vim | 4++++
A.vim/ftplugin/tex.vim | 2++
A.vim/vimrc | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 files changed, 143 insertions(+), 0 deletions(-)

diff --git a/.vim/ftplugin/c.vim b/.vim/ftplugin/c.vim @@ -0,0 +1,4 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab +setlocal autoindent diff --git a/.vim/ftplugin/css.vim b/.vim/ftplugin/css.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab diff --git a/.vim/ftplugin/html.vim b/.vim/ftplugin/html.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab diff --git a/.vim/ftplugin/json.vim b/.vim/ftplugin/json.vim @@ -0,0 +1,4 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab +setlocal autoindent diff --git a/.vim/ftplugin/php.vim b/.vim/ftplugin/php.vim @@ -0,0 +1,4 @@ +" https://www.php-fig.org/psr/psr-12/ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim @@ -0,0 +1,4 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal expandtab +setlocal autoindent diff --git a/.vim/ftplugin/sql.vim b/.vim/ftplugin/sql.vim @@ -0,0 +1,4 @@ +setlocal shiftwidth=2 +setlocal tabstop=2 +setlocal expandtab +setlocal autoindent diff --git a/.vim/ftplugin/tex.vim b/.vim/ftplugin/tex.vim @@ -0,0 +1,2 @@ +set sw=2 +set iskeyword+=: diff --git a/.vim/vimrc b/.vim/vimrc @@ -0,0 +1,115 @@ +syntax on +set background=dark +"colorscheme solarized +"let g:solarized_termcolors=256 +set number +autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + + +set nocompatible " be iMproved, required +filetype off " required + +" set the runtime path to include Vundle and initialize +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +" alternatively, pass a path where Vundle should install plugins +"call vundle#begin('~/some/path/here') + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' + +Plugin 'arcticicestudio/nord-vim' +Plugin 'itchyny/lightline.vim' +Plugin 'wakatime/vim-wakatime' +Plugin 'joshdick/onedark.vim' +Plugin 'ledger/vim-ledger' +"Plugin 'xuhdev/vim-latex-live-preview' +" The following are examples of different formats supported. +" Keep Plugin commands between vundle#begin/end. +" plugin on GitHub repo +"Plugin 'tpope/vim-fugitive' +" plugin from http://vim-scripts.org/vim/scripts.html +" Plugin 'L9' +" Git plugin not hosted on GitHub +"Plugin 'git://git.wincent.com/command-t.git' +" git repos on your local machine (i.e. when working on your own plugin) +"Plugin 'file:///home/gmarik/path/to/plugin' +" The sparkup vim script is in a subdirectory of this repo called vim. +" Pass the path to set the runtimepath properly. +"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} +" Install L9 and avoid a Naming conflict if you've already installed a +" different version somewhere else. +" Plugin 'ascenator/L9', {'name': 'newL9'} + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required +" To ignore plugin indent changes, instead use: +"filetype plugin on +" +" Brief help +" :PluginList - lists configured plugins +" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate +" :PluginSearch foo - searches for foo; append `!` to refresh local cache +" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal +" +" see :h vundle for more details or wiki for FAQ +" Put your non-Plugin stuff after this line + + +"if ! has("gui_running") +"if $DISPLAY == ':0' + "let g:airline_powerline_fonts = 1 + "let g:airline_theme='solarized_flood' +"else + "au VimEnter * AirlineToggle + "let g:loaded_airline = 1 +"endif + +if $DISPLAY == ':0' + let g:lightline = { + \ 'colorscheme': 'nord', + \ 'component': { + \ 'lineinfo': ' %3l:%-2v', + \ }, + \ 'component_function': { + \ 'readonly': 'LightlineReadonly', + \ 'fugitive': 'LightlineFugitive' + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' } + \ } + function! LightlineReadonly() + return &readonly ? '' : '' + endfunction + function! LightlineFugitive() + if exists('*FugitiveHead') + let branch = FugitiveHead() + return branch !=# '' ? ''.branch : '' + endif + return '' + endfunction +endif + + +colorscheme nord +set laststatus=2 +set noshowmode + +"filetype +autocmd BufNewFile,BufRead *.gradle set syntax=groovy +autocmd BufNewFile,BufRead *.gradle.kts set syntax=groovy +autocmd BufNewFile,BufRead *.kt set syntax=groovy + +"autocmd Filetype yaml setlocal tabstop=2 ai colorcolumn=1,3,5,7,9,80 + +set grepprg=grep\ -nH\ $* +let g:tex_flavor='latex' +"let g:livepreview_previewer = 'zathura' +let g:Tex_DefaultTargetFormat = 'pdf' +"let g:Tex_CompileRule_pdf = 'pdflatex' +let g:Tex_ViewRule_pdf = 'zathura'