aboutsummaryrefslogtreecommitdiff
path: root/after/ftplugin
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-03-23 23:15:00 +0800
committerjdhao <jdhao@hotmail.com>2021-03-23 23:15:00 +0800
commit2636f8575e2857ec89bf11937ce1d4df6ea9f153 (patch)
tree9d3619897a3553be868c4f78d223ca2343fea036 /after/ftplugin
parentb18a643145cb7b2db0551c2041fc86b5bd620eb9 (diff)
Add more settings for cpp
Diffstat (limited to 'after/ftplugin')
-rw-r--r--after/ftplugin/cpp.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/after/ftplugin/cpp.vim b/after/ftplugin/cpp.vim
index 135e477..4d451de 100644
--- a/after/ftplugin/cpp.vim
+++ b/after/ftplugin/cpp.vim
@@ -1,5 +1,10 @@
set commentstring=//\ %s
+set tabstop=2 " number of visual spaces per TAB
+set softtabstop=2 " number of spaces in tab when editing
+set shiftwidth=2 " number of spaces to use for autoindent
+set expandtab " expand tab to spaces so that tabs are spaces
+
nnoremap <silent> <buffer> <F9> :call <SID>compile_run_cpp()<CR>
function! s:compile_run_cpp() abort