Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
taigacute
authored and
taigacute
committed
Jan 26, 2019
1 parent
93f3893
commit e57cfad
Showing
10 changed files
with
156 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
function! Dot(path) | ||
return "~/.config/nvim/" . a:path | ||
endfunction | ||
|
||
for file in split(glob(Dot('rc/*.vim')), '\n') | ||
exe 'source' file | ||
endfor | ||
|
||
"execute 'source' fnamemodify(expand('<sfile>'), ':h').'/config/nvim/rc/vimrc' | ||
execute 'source' fnamemodify(expand('<sfile>'), ':h').'/rc/vimrc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
" dein configurations. | ||
|
||
let g:dein#install_progress_type = 'title' | ||
let g:dein#enable_notification = 1 | ||
let g:dein#install_log_filename = '~/.tmp/dein.log' | ||
|
||
let $CACHE = expand('~/.cache') | ||
let s:path = expand('$CACHE/dein') | ||
if !dein#load_state(s:path) | ||
finish | ||
endif | ||
|
||
call dein#begin(s:path, expand('<sfile>')) | ||
|
||
call dein#load_toml('~/.config/nvim/rc/dein/dein.toml', {'lazy': 0}) | ||
call dein#load_toml('~/.config/nvim/rc/dein/deinlazy.toml', {'lazy' : 1}) | ||
|
||
|
||
call dein#end() | ||
call dein#save_state() | ||
|
||
if dein#check_install() | ||
" Installation check. | ||
call dein#install() | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
"--------------------------------------------------------------------------- | ||
" Initialize: | ||
""Use ',' instead of '\'. | ||
" Use <Leader> in global plugin. | ||
let g:mapleader = ',' | ||
" Use <LocalLeader> in filetype plugin. | ||
let g:maplocalleader = ';' | ||
|
||
|
||
|
||
let $CONFIG = expand('~/.config') | ||
|
||
|
||
if !isdirectory(expand($CONFIG)) | ||
call mkdir(expand($CONFIG), 'p') | ||
endif | ||
|
||
|
||
" Load dein. | ||
let s:dein_dir = finddir('dein.vim', '.;') | ||
if s:dein_dir != '' || &runtimepath !~ '/dein.vim' | ||
if s:dein_dir == '' && &runtimepath !~ '/dein.vim' | ||
let s:dein_dir = expand('$CONFIG/nvim') | ||
\. '/repos/github.com/Shougo/dein.vim' | ||
if !isdirectory(s:dein_dir) | ||
execute '!git clone https://github.com/Shougo/dein.vim' s:dein_dir | ||
endif | ||
endif | ||
execute 'set runtimepath^=' . substitute( | ||
\ fnamemodify(s:dein_dir, ':p') , '/$', '', '') | ||
endif | ||
|
||
" Disable packpath | ||
set packpath= | ||
|
||
|
||
"--------------------------------------------------------------------------- | ||
" Disable default plugins | ||
|
||
|
||
let g:loaded_2html_plugin = 1 | ||
let g:loaded_logiPat = 1 | ||
let g:loaded_getscriptPlugin = 1 | ||
let g:loaded_gzip = 1 | ||
let g:loaded_man = 1 | ||
let g:loaded_matchit = 1 | ||
let g:loaded_matchparen = 1 | ||
let g:loaded_netrwFileHandlers = 1 | ||
let g:loaded_netrwPlugin = 1 | ||
let g:loaded_netrwSettings = 1 | ||
let g:loaded_rrhelper = 1 | ||
let g:loaded_shada_plugin = 1 | ||
let g:loaded_spellfile_plugin = 1 | ||
let g:loaded_tarPlugin = 1 | ||
let g:loaded_tutor_mode_plugin = 1 | ||
let g:loaded_vimballPlugin = 1 | ||
let g:loaded_zipPlugin = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
"set my leader | ||
let g:mapleader="," | ||
let g:maplocalleader=';' | ||
|
||
"默认键位的映射 | ||
"定义快捷键到行首非空字符和行尾$ | ||
nmap ls ^ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
if &compatible | ||
set nocompatible | ||
endif | ||
|
||
function! s:source_rc(path, ...) abort | ||
let use_global = get(a:000, 0, !has('vim_starting')) | ||
let abspath = resolve(expand('~/.config/nvim/rc/' . a:path)) | ||
if !use_global | ||
execute 'source' fnameescape(abspath) | ||
return | ||
endif | ||
|
||
" substitute all 'set' to 'setglobal' | ||
let content = map(readfile(abspath), | ||
\ 'substitute(v:val, "^\\W*\\zsset\\ze\\W", "setglobal", "")') | ||
" create tempfile and source the tempfile | ||
let tempfile = tempname() | ||
try | ||
call writefile(content, tempfile) | ||
execute 'source' fnameescape(tempfile) | ||
finally | ||
if filereadable(tempfile) | ||
call delete(tempfile) | ||
endif | ||
endtry | ||
endfunction | ||
|
||
|
||
if has('vim_starting') | ||
call s:source_rc('init.vim') | ||
endif | ||
|
||
call s:source_rc('dein.vim') | ||
|
||
if !has('vim_starting') | ||
call dein#call_hook('source') | ||
call dein#call_hook('post_source') | ||
|
||
syntax enable | ||
filetype plugin indent on | ||
endif | ||
call s:source_rc('general.vim') | ||
call s:source_rc('mappings.vim') | ||
|
||
"--------------------------------------------------------------------------- | ||
|
||
set secure | ||
|
||
" vim: foldmethod=marker |