From f15fa3fd8f409df7c755f925108c40d6924ed631 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 20 Jun 2024 02:46:05 +0200 Subject: Update vimrc --- vimrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index d47e7ae..26d9d47 100644 --- a/vimrc +++ b/vimrc @@ -17,6 +17,11 @@ nnoremap :buffers:buffer nnoremap :Explore nnoremap :copen +" Personal tabs/spaces settings. +autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 +autocmd Filetype c,cpp,lua setlocal expandtab tabstop=4 shiftwidth=4 +autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 + " Commenting blocks of code. " https://stackoverflow.com/a/1676672 augroup commenting_blocks_of_code @@ -30,11 +35,6 @@ augroup END noremap cc :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch noremap cu :silent s/^\(\s*\)\V=escape(b:comment_leader,'\/')//e:nohlsearch -" Personal tabs/spaces settings. -autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 -autocmd Filetype c,cpp,lua setlocal expandtab tabstop=4 shiftwidth=4 -autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 - " Function to auto format source code files. function! Format() if &filetype == 'c' | write | call system('clang-format -i '.expand('%')) | edit! | endif -- cgit v1.2.3