Cleanup ftplugins
This commit is contained in:
parent
e0ee2e3259
commit
4902448bb1
@ -2,7 +2,6 @@
|
|||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
|
||||||
if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
|
if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${XDG_CONFIG_HOME}/bash/prompt.sh"
|
source "${XDG_CONFIG_HOME}/bash/prompt.sh"
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
set noexpandtab
|
set noexpandtab
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
set tabstop=4
|
|
||||||
|
|
||||||
" use goimports for formatting
|
" use goimports for formatting
|
||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
@ -20,7 +17,6 @@ let g:ale_linters['go'] = ['golint', 'gopls']
|
|||||||
"let g:go_metalinter_autosave=1
|
"let g:go_metalinter_autosave=1
|
||||||
"let g:go_metalinter_autosave_enabled=['golint', 'govet', 'typecheck']
|
"let g:go_metalinter_autosave_enabled=['golint', 'govet', 'typecheck']
|
||||||
|
|
||||||
|
|
||||||
" Open go doc in vertical window, horizontal, or tab
|
" Open go doc in vertical window, horizontal, or tab
|
||||||
nnoremap <leader>d :GoDef<CR>
|
nnoremap <leader>d :GoDef<CR>
|
||||||
nnoremap <leader>t :GoDefType<CR>
|
nnoremap <leader>t :GoDefType<CR>
|
||||||
|
|||||||
1
go/.config/vim/plug.d/go.vim
Normal file
1
go/.config/vim/plug.d/go.vim
Normal file
@ -0,0 +1 @@
|
|||||||
|
Plug 'fatih/vim-go', { 'tag': 'v1.24', 'for': [ 'go' ] }
|
||||||
1
rust/.config/vim/plug.d/rust.vim
Normal file
1
rust/.config/vim/plug.d/rust.vim
Normal file
@ -0,0 +1 @@
|
|||||||
|
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
||||||
@ -1,4 +0,0 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces
|
|
||||||
set shiftwidth=2 " unify
|
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
|
||||||
@ -1 +1 @@
|
|||||||
set nofoldenable " disable folding
|
setlocal nofoldenable
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
|
||||||
set shiftwidth=2 " unify
|
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
|
||||||
|
|
||||||
@ -1,6 +1,4 @@
|
|||||||
|
setlocal expandtab
|
||||||
set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
setlocal shiftwidth=2
|
||||||
set shiftwidth=2 " unify
|
setlocal softtabstop=2
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
setlocal tabstop=2
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces
|
setlocal expandtab
|
||||||
set shiftwidth=2 " unify
|
setlocal shiftwidth=2
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
setlocal softtabstop=2
|
||||||
set tabstop=2
|
setlocal tabstop=2
|
||||||
|
|
||||||
let g:ale_linters['javascript'] = ['eslint']
|
let g:ale_linters['javascript'] = ['eslint']
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
|
||||||
set shiftwidth=2 " unify
|
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
|
||||||
@ -1 +0,0 @@
|
|||||||
setlocal noexpandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
setlocal expandtab
|
||||||
set shiftwidth=4 " unify
|
setlocal shiftwidth=4
|
||||||
set softtabstop=4 " Pressing backspace works like tabs
|
setlocal softtabstop=4
|
||||||
set tabstop=4 " real tabs should be 4, but they will show with set list on
|
setlocal tabstop=4
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces. For tabs, set noexpandtab
|
setlocal expandtab
|
||||||
set shiftwidth=2 " unify
|
setlocal shiftwidth=2
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
setlocal softtabstop=2
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
setlocal tabstop=2
|
||||||
|
|||||||
4
vim/.config/vim/ftplugin/vim.vim
Normal file
4
vim/.config/vim/ftplugin/vim.vim
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
setlocal expandtab
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
setlocal tabstop=2
|
||||||
@ -1,4 +1,4 @@
|
|||||||
set expandtab " expandtab converts tabs to spaces
|
setlocal expandtab
|
||||||
set shiftwidth=2 " unify
|
setlocal shiftwidth=2
|
||||||
set softtabstop=2 " Pressing backspace works like tabs
|
setlocal softtabstop=2
|
||||||
set tabstop=2 " real tabs should be 4, but they will show with set list on
|
setlocal tabstop=2
|
||||||
|
|||||||
@ -1,4 +1,2 @@
|
|||||||
Plug 'cespare/vim-toml', { 'for': 'toml' }
|
Plug 'cespare/vim-toml', { 'for': 'toml' }
|
||||||
Plug 'fatih/vim-go', { 'tag': 'v1.24', 'for': [ 'go' ] }
|
|
||||||
Plug 'hashivim/vim-hashicorp-tools'
|
Plug 'hashivim/vim-hashicorp-tools'
|
||||||
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
|
||||||
|
|||||||
@ -3,12 +3,10 @@ Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle', 'tag': '6.9.8' }
|
|||||||
" Close all open buffers on entering a window if the only
|
" Close all open buffers on entering a window if the only
|
||||||
" buffer that's left is the NERDTree buffer
|
" buffer that's left is the NERDTree buffer
|
||||||
function! s:CloseIfOnlyNerdTreeLeft()
|
function! s:CloseIfOnlyNerdTreeLeft()
|
||||||
if exists("t:NERDTreeBufName")
|
if exists("t:NERDTreeBufName") &&
|
||||||
if bufwinnr(t:NERDTreeBufName) != -1
|
\ bufwinnr(t:NERDTreeBufName) != -1 &&
|
||||||
if winnr("$") == 1
|
\ winnr("$") == 1
|
||||||
q
|
quit
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,15 @@ if has('autocmd')
|
|||||||
filetype indent on
|
filetype indent on
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Tabs
|
||||||
|
set complete-=i
|
||||||
set autoindent
|
set autoindent
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
set complete-=i
|
|
||||||
set smarttab
|
set smarttab
|
||||||
|
set noexpandtab
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
set tabstop=4
|
||||||
|
|
||||||
set nrformats-=octal
|
set nrformats-=octal
|
||||||
|
|
||||||
@ -71,7 +76,6 @@ endif
|
|||||||
set sessionoptions-=options
|
set sessionoptions-=options
|
||||||
set viewoptions-=options
|
set viewoptions-=options
|
||||||
|
|
||||||
|
|
||||||
" Allow color schemes to do bright colors without forcing bold.
|
" Allow color schemes to do bright colors without forcing bold.
|
||||||
if &t_Co == 8 && $TERM !~# '^Eterm'
|
if &t_Co == 8 && $TERM !~# '^Eterm'
|
||||||
set t_Co=16
|
set t_Co=16
|
||||||
@ -107,12 +111,6 @@ set magic
|
|||||||
set omnifunc=syntaxcomplete#Complete
|
set omnifunc=syntaxcomplete#Complete
|
||||||
set completeopt=menu,longest,preview
|
set completeopt=menu,longest,preview
|
||||||
|
|
||||||
" Tabs
|
|
||||||
set expandtab
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
set tabstop=4
|
|
||||||
|
|
||||||
" Indent
|
" Indent
|
||||||
set smartindent
|
set smartindent
|
||||||
set copyindent
|
set copyindent
|
||||||
|
|||||||
@ -6,7 +6,7 @@ set nocompatible
|
|||||||
" can be set before loading plugin settings. This allows the plugin setting
|
" can be set before loading plugin settings. This allows the plugin setting
|
||||||
" files to set mappings with leader keys
|
" files to set mappings with leader keys
|
||||||
for f in split(glob($XDG_CONFIG_HOME.'/vim/init.d/*.vim'), '\n')
|
for f in split(glob($XDG_CONFIG_HOME.'/vim/init.d/*.vim'), '\n')
|
||||||
exe 'source' f
|
execute 'source '.fnameescape(f)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
" The plugged plugin manager function calls need to be called between the
|
" The plugged plugin manager function calls need to be called between the
|
||||||
@ -14,6 +14,6 @@ endfor
|
|||||||
" loading won't work.
|
" loading won't work.
|
||||||
call plug#begin($XDG_DATA_HOME.'/vim/plugged')
|
call plug#begin($XDG_DATA_HOME.'/vim/plugged')
|
||||||
for f in split(glob($XDG_CONFIG_HOME.'/vim/plug.d/*.vim'), '\n')
|
for f in split(glob($XDG_CONFIG_HOME.'/vim/plug.d/*.vim'), '\n')
|
||||||
exe 'source' f
|
execute 'source '.fnameescape(f)
|
||||||
endfor
|
endfor
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user