From 42d3c49fea1f0daf6aa86ac557e3b1b9a0fcbcbe Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 14 Aug 2021 00:17:50 +0800 Subject: refactor: change file name --- core/globals.vim | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ core/variables.vim | 68 ------------------------------------------------------ init.vim | 2 +- 3 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 core/globals.vim delete mode 100644 core/variables.vim diff --git a/core/globals.vim b/core/globals.vim new file mode 100644 index 0000000..b1c795f --- /dev/null +++ b/core/globals.vim @@ -0,0 +1,68 @@ +"{ Global Variable + +"{{ Custom variables +let g:is_win = has('win32') || has('win64') +let g:is_linux = has('unix') && !has('macunix') +let g:is_mac = has('macunix') +"}} + +"{{ Builtin variables +" Disable Python2 support +let g:loaded_python_provider = 0 + +" Disable perl provider +let g:loaded_perl_provider = 0 + +" Disable ruby provider +let g:loaded_ruby_provider = 0 + +" Disable node provider +let g:loaded_node_provider = 0 + +let g:did_install_default_menus = 1 " do not load menu + +" Path to Python 3 interpreter (must be an absolute path), make startup +" faster. See https://neovim.io/doc/user/provider.html. +if executable('python') + if g:is_win + let g:python3_host_prog=substitute(exepath('python'), '.exe$', '', 'g') + elseif g:is_linux || g:is_mac + let g:python3_host_prog=exepath('python') + endif +else + echoerr 'Python 3 executable not found! You must install Python 3 and set its PATH correctly!' +endif + +" Custom mapping (see `:h mapleader` for more info) +let mapleader = ',' + +" Enable highlighting for lua HERE doc inside vim script +let g:vimsyn_embed = 'l' +"}} + +"{{ Disable loading certain plugins +" Whether to load netrw by default, see +" https://github.com/bling/dotvim/issues/4 +" let g:loaded_netrw = 0 +" let g:loaded_netrwPlugin = 0 +let g:netrw_liststyle = 3 +if g:is_win + let g:netrw_http_cmd = 'curl --ssl-no-revoke -Lo' +endif + +" Do not load tohtml.vim +let g:loaded_2html_plugin = 1 + +" Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all these plugins are +" related to checking files inside compressed files) +let g:loaded_zipPlugin = 1 +let loaded_gzip = 1 +let g:loaded_tarPlugin = 1 + +let g:loaded_tutor_mode_plugin = 1 " do not load the tutor plugin + +" Do not use builtin matchit.vim and matchparen.vim since we use vim-matchup +let g:loaded_matchit = 1 +let g:loaded_matchparen = 1 +"}} +"} diff --git a/core/variables.vim b/core/variables.vim deleted file mode 100644 index b1c795f..0000000 --- a/core/variables.vim +++ /dev/null @@ -1,68 +0,0 @@ -"{ Global Variable - -"{{ Custom variables -let g:is_win = has('win32') || has('win64') -let g:is_linux = has('unix') && !has('macunix') -let g:is_mac = has('macunix') -"}} - -"{{ Builtin variables -" Disable Python2 support -let g:loaded_python_provider = 0 - -" Disable perl provider -let g:loaded_perl_provider = 0 - -" Disable ruby provider -let g:loaded_ruby_provider = 0 - -" Disable node provider -let g:loaded_node_provider = 0 - -let g:did_install_default_menus = 1 " do not load menu - -" Path to Python 3 interpreter (must be an absolute path), make startup -" faster. See https://neovim.io/doc/user/provider.html. -if executable('python') - if g:is_win - let g:python3_host_prog=substitute(exepath('python'), '.exe$', '', 'g') - elseif g:is_linux || g:is_mac - let g:python3_host_prog=exepath('python') - endif -else - echoerr 'Python 3 executable not found! You must install Python 3 and set its PATH correctly!' -endif - -" Custom mapping (see `:h mapleader` for more info) -let mapleader = ',' - -" Enable highlighting for lua HERE doc inside vim script -let g:vimsyn_embed = 'l' -"}} - -"{{ Disable loading certain plugins -" Whether to load netrw by default, see -" https://github.com/bling/dotvim/issues/4 -" let g:loaded_netrw = 0 -" let g:loaded_netrwPlugin = 0 -let g:netrw_liststyle = 3 -if g:is_win - let g:netrw_http_cmd = 'curl --ssl-no-revoke -Lo' -endif - -" Do not load tohtml.vim -let g:loaded_2html_plugin = 1 - -" Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all these plugins are -" related to checking files inside compressed files) -let g:loaded_zipPlugin = 1 -let loaded_gzip = 1 -let g:loaded_tarPlugin = 1 - -let g:loaded_tutor_mode_plugin = 1 " do not load the tutor plugin - -" Do not use builtin matchit.vim and matchparen.vim since we use vim-matchup -let g:loaded_matchit = 1 -let g:loaded_matchparen = 1 -"}} -"} diff --git a/init.vim b/init.vim index 20f5ed9..14e94df 100644 --- a/init.vim +++ b/init.vim @@ -50,7 +50,7 @@ "} "{ Main configurations -let g:config_file_list = ['variables.vim', +let g:config_file_list = ['globals.vim', \ 'options.vim', \ 'autocommands.vim', \ 'mappings.vim', -- cgit v1.2.3