mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
neovim/emacs: I'm a 4-space guy now
This commit is contained in:
parent
4e108abbbd
commit
5ca2f568df
@ -15,9 +15,9 @@
|
||||
(setq-default
|
||||
;; Tab vs space
|
||||
indent-tabs-mode nil
|
||||
tab-width 2
|
||||
evil-shift-width 2
|
||||
standard-indent 2
|
||||
tab-width 4
|
||||
evil-shift-width 4
|
||||
standard-indent 4
|
||||
line-spacing 2
|
||||
;; From @tecosaur
|
||||
delete-by-moving-to-trash t
|
||||
|
@ -19,8 +19,8 @@ set formatoptions-=cro
|
||||
set clipboard+=unnamedplus
|
||||
set number relativenumber
|
||||
" set cursorline
|
||||
set tabstop=2 softtabstop=2 " 2 spaces for 1 tab
|
||||
set shiftwidth=2 " 2 spaces for 1 indent
|
||||
set tabstop=4 softtabstop=4 " 4 spaces for 1 tab
|
||||
set shiftwidth=4 " 4 spaces for 1 indent
|
||||
set smarttab
|
||||
set expandtab " convert tabs to spaces
|
||||
set smartindent
|
||||
|
@ -4,7 +4,7 @@ inoremap kj <Esc>
|
||||
" Better Y
|
||||
nmap Y y$
|
||||
" Basic file commands
|
||||
nnoremap <A-t> :!touch<Space>
|
||||
nnoremap <A-f> :!touch<Space>
|
||||
nnoremap <A-e> :!crf<Space>
|
||||
nnoremap <A-d> :!mkdir<Space>
|
||||
nnoremap <A-m> :!mv<Space>%<Space>
|
||||
@ -59,3 +59,18 @@ cnoreabbrev Qa qa
|
||||
cnoreabbrev QA qa
|
||||
cnoreabbrev Wqa wqa
|
||||
cnoreabbrev WQa wqa
|
||||
|
||||
function! ToggleIndentStyle()
|
||||
if &expandtab == 1
|
||||
set noexpandtab
|
||||
set softtabstop&
|
||||
set shiftwidth&
|
||||
echomsg "Switched to indent with tabs."
|
||||
else
|
||||
set expandtab
|
||||
set softtabstop = 4
|
||||
set shiftwidth = 4
|
||||
echomsg "Switched to indent with 4 spaces."
|
||||
endif
|
||||
endfunction
|
||||
noremap <A-t> :call ToggleIndentStyle()<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user