mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-25 20:51:26 -05:00
Fixed some keybindings, added help dialog sidebar toggles (help dialogs
now always pop up veritcally, which made sense to me considering their column width and the average size of screens these day), touched up the readme and some missing keyboard toggles, added a few more formats relevant to emmet, and gave variables default values in the configs so they don't need to be declared (default values are stated in the README)
This commit is contained in:
parent
b48c619ad1
commit
e9481f6bc8
5 changed files with 83 additions and 47 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -67,3 +67,6 @@
|
||||||
[submodule "vim/bundle/vim-polyglot"]
|
[submodule "vim/bundle/vim-polyglot"]
|
||||||
path = vim/bundle/vim-polyglot
|
path = vim/bundle/vim-polyglot
|
||||||
url = https://github.com/sheerun/vim-polyglot.git
|
url = https://github.com/sheerun/vim-polyglot.git
|
||||||
|
[submodule "vim/bundle/vim-fugitive"]
|
||||||
|
path = vim/bundle/vim-fugitive
|
||||||
|
url = https://github.com/tpope/vim-fugitive.git
|
||||||
|
|
35
README.md
35
README.md
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
## Requirements ##
|
## Requirements ##
|
||||||
|
|
||||||
1. Git: Required to clone and update the repository, and pull the plugins as submodules.
|
1. **Git**: Required to clone and update the repository, and pull the plugins as submodules.
|
||||||
3. CTags: Available @ <http://ctags.sourceforge.net>, place in __$PATH__ or the vim folder to use the tagbar or extended C omni/auto-completion.
|
3. **CTags**: Available @ <http://ctags.sourceforge.net>, place in __$PATH__ or the vim folder to use the tagbar or extended C omni/auto-completion.
|
||||||
4. Vim v7.4+: Everything has been written and tested using Vim 7.4.135, and I assume there could be issues with 7.3 and below.
|
4. **Vim** v7.4+: Everything has been written and tested using Vim 7.4.135, and I assume there could be issues with 7.3 and below.
|
||||||
2. Bash (optional): Required to use the update and ctags generation scripts, both of which can be run with the commands listed within.
|
2. **Bash** (__optional__): Required to use the update and ctags generation scripts, both of which can be run with the commands listed within.
|
||||||
5. Powerline Fonts (optional): Required for an extended look/feel using lightline, otherwise it should be toggled off in the vimrc.
|
5. **Powerline Fonts** (__optional__): Required for an extended look/feel using lightline, otherwise it should be toggled off in the vimrc.
|
||||||
|
|
||||||
## Features ##
|
## Features ##
|
||||||
|
|
||||||
|
@ -19,17 +19,19 @@
|
||||||
|
|
||||||
1. Clone the darkcloud-vimconfig repo and use the __update__ script to install the plugins:
|
1. Clone the darkcloud-vimconfig repo and use the __update__ script to install the plugins:
|
||||||
|
|
||||||
`git clone https://github.com/prurigro/darkcloud-vimconfig.git`
|
* `git clone https://github.com/prurigro/darkcloud-vimconfig.git`
|
||||||
|
* `sh darkcloud-vimconfig/update`
|
||||||
`sh darkcloud-vimconfig/update`
|
|
||||||
|
|
||||||
* Note: The __update__ script requires bash, but you can enter the __darkcloud-vimconfig/__ folder and run: `git submodule update --init` to install the plugins manually if it's not available.
|
* Note: The __update__ script requires bash, but you can enter the __darkcloud-vimconfig/__ folder and run: `git submodule update --init` to install the plugins manually if it's not available.
|
||||||
|
|
||||||
2. Open vim and run: `:version` to find the values for "user vimrc file" for a single-user install and "system vimrc file" for a system-wide install, then copy the vimrc file from `darkcloud-vimconfig/` to one of these locations.
|
2. Open vim and run: `:version` to find the values for "user vimrc file" for a single-user install and "system vimrc file" for a system-wide install, then copy the vimrc file from `darkcloud-vimconfig/` to one of these locations.
|
||||||
3. Open the vimrc you just installed and edit the variables in the "USER CONFIG SETTINGS" section:
|
|
||||||
* **s:darkcloudpath**: Set to the location of the darkcloud-vimconfig folder. (default: __/etc/darkcloud-vimconfig__)
|
3. Open the vimrc you just installed and either edit the variables in the "__USER CONFIG SETTINGS__" section, or (preferably) copy them to __vim/vimrc.user__ and edit them there:
|
||||||
* **g:autostartchecker**: 1 = Check syntax once an appropriate file is loaded | 0 = Check syntax only after syntax checking is toggled on (default: 1)
|
|
||||||
* **g:powerlinefonts**: 1 = Render the statusline using characters available with powerline-patched fonts | 0 = Render the statusbar with less attractive but more compatible characters available in all fonts (default: 1)
|
* **s:darkcloudpath**: Set to the location of the darkcloud-vimconfig folder. (__default__: __/etc/darkcloud-vimconfig__)
|
||||||
* **guifont**: Set to the name of the font you would like to use with gVim followed by the size, making sure to escape spaces and that a powerline-compatible font is selected if the above option is set to 1. (default: Droid\ Sans\ Mono\ 12)
|
* **g:autostartchecker**: 1 = Check syntax once an appropriate file is loaded | 0 = Check syntax only after syntax checking is toggled on (__default__: 1)
|
||||||
|
* **g:powerlinefonts**: 1 = Render the statusline using characters available with powerline-patched fonts | 0 = Render the statusbar with less attractive but more compatible characters available in all fonts (__default__: 0)
|
||||||
|
* **guifont**: Set to the name of the font you would like to use with gVim followed by the size, making sure to escape spaces and that a powerline-compatible font is selected if the above option is set to 1. (__default__: Droid\ Sans\ Mono\ 12)
|
||||||
|
|
||||||
4. Install ctags (http://ctags.sourceforge.net) to your system using a package and ensure it can be accessed in __$PATH__, or install support for vim exclusively by copying the ctags binary to the __darkcloud-vimconfig/vim__ folder.
|
4. Install ctags (http://ctags.sourceforge.net) to your system using a package and ensure it can be accessed in __$PATH__, or install support for vim exclusively by copying the ctags binary to the __darkcloud-vimconfig/vim__ folder.
|
||||||
|
|
||||||
## Configuration ##
|
## Configuration ##
|
||||||
|
@ -44,8 +46,9 @@
|
||||||
|
|
||||||
## Notes ##
|
## Notes ##
|
||||||
|
|
||||||
* Runtimepath: To find the runtimepath locations currently set, run the following in vim: `:verbose set runtimepath`.
|
* **Runtimepath**: To find the runtimepath locations currently set, run the following in vim: `:verbose set runtimepath`.
|
||||||
* Key Bindings: You can find a list of the bindings added by darkcloud-vimconfig, as well as a few of the ones added by plugins in __vim/config/keyboard.vim__.
|
* **Reference**: Type `??`, `?>` and '?<' to toggle sidebars with different reference topics.
|
||||||
|
* **Unique Key Bindings**: You can find a list of the bindings added by darkcloud-vimconfig, as well as a few of the ones added by plugins in __vim/config/keyboard.vim__.
|
||||||
|
|
||||||
## Credits ##
|
## Credits ##
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,15 @@
|
||||||
"
|
"
|
||||||
" (tabs)
|
" (tabs)
|
||||||
" <Leader>9 | (A) -> go to the next open tab
|
" <Leader>9 | (A) -> go to the next open tab
|
||||||
" <Leader>0 | (A) -> go to the previous open tab
|
" <Leader>0 | (A) -> go to the previous open tab
|
||||||
" <Leader>- | (A) -> open a new tab
|
" <Leader>- | (A) -> open a new tab
|
||||||
" <Leader>= | (A) -> create a new tab with vimfiler
|
" <Leader>= | (A) -> create a new tab with vimfiler
|
||||||
" <Leader>+ | (A) -> create a new tab with vimfiler
|
" <Leader>+ | (A) -> create a new tab with vimfiler
|
||||||
"
|
"
|
||||||
" (toggles)
|
" (toggles)
|
||||||
|
" ?? | (N) -> toggle the quick reference sidebar
|
||||||
|
" ?> | (N) -> toggle command reference sidebar
|
||||||
|
" ?< | (N) -> toggle normal mode key bindings reference sidebar
|
||||||
" `` | (N) -> toggle the vimfiler sidebar on the right
|
" `` | (N) -> toggle the vimfiler sidebar on the right
|
||||||
" ~~ | (N) -> toggle the vimfiler sidebar on the left
|
" ~~ | (N) -> toggle the vimfiler sidebar on the left
|
||||||
" <Space> | (N) -> toggle folds
|
" <Space> | (N) -> toggle folds
|
||||||
|
@ -150,17 +153,26 @@
|
||||||
" <Left> | (A) -> same as k (up)
|
" <Left> | (A) -> same as k (up)
|
||||||
" h | (A) -> same as k (up)
|
" h | (A) -> same as k (up)
|
||||||
"
|
"
|
||||||
|
" (help)
|
||||||
|
" q | (N) -> close the dialog
|
||||||
|
"
|
||||||
" (vimfiler)
|
" (vimfiler)
|
||||||
" <Shift-Return> | (A) -> edit the selected file
|
" <LMouse><LMouse> | (N) -> edit selected file
|
||||||
" <LMouse><LMouse> | (A) -> edit selected file
|
" <LMouse> | (N) -> same as normal + justify on the left
|
||||||
" <Right> | (A) -> map to l, which opens a directory
|
" <MMouse> | (N) -> same as the left mouse
|
||||||
" <Left> | (A) -> map to h, which goes up one directory
|
" <RMouse> | (N) -> same as the left mouse
|
||||||
" <LMouse> | (A) -> same as normal + justify on the left
|
" <Right> | (N) -> map to l, which opens a directory
|
||||||
" <MMouse> | (A) -> same as the left mouse
|
" <Left> | (N) -> map to h, which goes up one directory
|
||||||
" <RMouse> | (A) -> same as the left mouse
|
" ' | (N) -> edit the selected file
|
||||||
"
|
|
||||||
" (vimfiler,gundo)
|
|
||||||
"
|
"
|
||||||
|
" (gundo)
|
||||||
|
" <LeftMouse> | (N) -> same as normal + justify on the left
|
||||||
|
" <MiddleMouse> | (N) -> same as the left mouse
|
||||||
|
" <RightMouse> | (N) -> same as the left mouse
|
||||||
|
" <Right> | (N) -> same as down
|
||||||
|
" l | (N) -> same as j
|
||||||
|
" <Left> | (N) -> same as Up
|
||||||
|
" h | (N) -> same as k
|
||||||
"
|
"
|
||||||
" Aliases:
|
" Aliases:
|
||||||
" :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo)
|
" :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo)
|
||||||
|
@ -203,6 +215,10 @@
|
||||||
nnoremap <silent><expr> `` ':VimFilerExplorer -direction=botright -winwidth=45<CR>'
|
nnoremap <silent><expr> `` ':VimFilerExplorer -direction=botright -winwidth=45<CR>'
|
||||||
nnoremap <silent><expr> ~~ ':VimFilerExplorer -direction=topleft -winwidth=45<CR>'
|
nnoremap <silent><expr> ~~ ':VimFilerExplorer -direction=topleft -winwidth=45<CR>'
|
||||||
|
|
||||||
|
nnoremap <silent><expr> ?? ':h quickref<CR>'
|
||||||
|
nnoremap <silent><expr> ?> ':exusage<CR>'
|
||||||
|
nnoremap <silent><expr> ?< ':viusage<CR>'
|
||||||
|
|
||||||
"toggle folded code at foldpoints
|
"toggle folded code at foldpoints
|
||||||
nnoremap <Space> za
|
nnoremap <Space> za
|
||||||
|
|
||||||
|
@ -381,23 +397,29 @@
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"FILETYPE SPECIFIC MAPPINGS: {{{
|
"FILETYPE SPECIFIC MAPPINGS: {{{
|
||||||
"gundo
|
"help
|
||||||
autocmd FileType gundo noremap <buffer> <LeftMouse> <LeftMouse>0l
|
autocmd FileType help nnoremap <buffer> <silent><expr> q ':q<CR>'
|
||||||
autocmd FileType gundo noremap <buffer> <MiddleMouse> <LeftMouse>
|
autocmd FileType help nnoremap <buffer> <silent><expr> ?? ':q<CR>'
|
||||||
autocmd FileType gundo noremap <buffer> <RightMouse> <LeftMouse>
|
autocmd FileType help nnoremap <buffer> <silent><expr> ?> ':q<CR>'
|
||||||
autocmd FileType gundo noremap <buffer> <Right> j
|
autocmd FileType help nnoremap <buffer> <silent><expr> ?< ':q<CR>'
|
||||||
autocmd FileType gundo noremap <buffer> l j
|
|
||||||
autocmd FileType gundo noremap <buffer> <Left> k
|
|
||||||
autocmd FileType gundo noremap <buffer> h k
|
|
||||||
|
|
||||||
"vimfiler
|
"vimfiler
|
||||||
autocmd FileType vimfiler noremap <buffer> <Right> l
|
autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
|
||||||
autocmd FileType vimfiler noremap <buffer> <Left> h
|
autocmd FileType vimfiler nmap <buffer> <LeftMouse> <LeftMouse>0
|
||||||
autocmd FileType vimfiler noremap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
|
autocmd FileType vimfiler nmap <buffer> <MiddleMouse> <LeftMouse>
|
||||||
autocmd FileType vimfiler noremap <buffer> <LeftMouse> <LeftMouse>0
|
autocmd FileType vimfiler nmap <buffer> <RightMouse> <LeftMouse>
|
||||||
autocmd FileType vimfiler noremap <buffer> <MiddleMouse> <LeftMouse>
|
autocmd FileType vimfiler nmap <Right> l
|
||||||
autocmd FileType vimfiler noremap <buffer> <RightMouse> <LeftMouse>
|
autocmd FileType vimfiler nmap <Left> h
|
||||||
autocmd FileType vimfiler noremap <S-CR> e
|
autocmd FileType vimfiler nmap ' e
|
||||||
|
|
||||||
|
"gundo
|
||||||
|
autocmd FileType gundo nmap <buffer> <LeftMouse> <LeftMouse>0l
|
||||||
|
autocmd FileType gundo nmap <buffer> <MiddleMouse> <LeftMouse>
|
||||||
|
autocmd FileType gundo nmap <buffer> <RightMouse> <LeftMouse>
|
||||||
|
autocmd FileType gundo nmap <Right> <Down>
|
||||||
|
autocmd FileType gundo nmap l j
|
||||||
|
autocmd FileType gundo nmap <Left> <Up>
|
||||||
|
autocmd FileType gundo nmap h k
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"DISABLED MAPPINGS: {{{
|
"DISABLED MAPPINGS: {{{
|
||||||
|
@ -421,7 +443,6 @@
|
||||||
autocmd Filetype gundo,vimfiler noremap <S-l> <Nop>
|
autocmd Filetype gundo,vimfiler noremap <S-l> <Nop>
|
||||||
autocmd Filetype gundo,vimfiler noremap <S-Left> <Nop>
|
autocmd Filetype gundo,vimfiler noremap <S-Left> <Nop>
|
||||||
autocmd Filetype gundo,vimfiler noremap <S-h> <Nop>
|
autocmd Filetype gundo,vimfiler noremap <S-h> <Nop>
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"ALIASES: COMMAND SHORTCUTS {{{
|
"ALIASES: COMMAND SHORTCUTS {{{
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
let g:use_emmet_complete_tag=1
|
let g:use_emmet_complete_tag=1
|
||||||
let g:user_emmet_mode='a'
|
let g:user_emmet_mode='a'
|
||||||
|
|
||||||
autocmd FileType html,css,php,aspx EmmetInstall
|
autocmd FileType css,json,htm,html,php,aspx EmmetInstall
|
||||||
|
|
||||||
if filereadable("~/.vim/snippets.json")
|
if filereadable("~/.vim/snippets.json")
|
||||||
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
|
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
|
||||||
|
@ -105,7 +105,11 @@
|
||||||
call lightline#update()
|
call lightline#update()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"status bar config with and without powerline fonts
|
"status bar config with and without powerline fonts (defaults to off)
|
||||||
|
if !exists("g:powerlinefonts")
|
||||||
|
let g:powerlinefonts=0
|
||||||
|
endif
|
||||||
|
|
||||||
if (g:powerlinefonts == 1)
|
if (g:powerlinefonts == 1)
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'darkcloud',
|
\ 'colorscheme': 'darkcloud',
|
||||||
|
@ -163,6 +167,10 @@
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"SYNTASTIC: CONFIGURE SYNTAX CHECKING {{{
|
"SYNTASTIC: CONFIGURE SYNTAX CHECKING {{{
|
||||||
|
if !exists("g:autostartchecker")
|
||||||
|
let g:autostartchecker=1
|
||||||
|
endif
|
||||||
|
|
||||||
if (g:autostartchecker == 1)
|
if (g:autostartchecker == 1)
|
||||||
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
|
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
|
||||||
let g:syntastic_check_on_open=1
|
let g:syntastic_check_on_open=1
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell
|
autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell
|
||||||
autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber
|
autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber
|
||||||
autocmd FileType mail,notmuch,text setlocal wrap
|
autocmd FileType mail,notmuch,text setlocal wrap
|
||||||
|
autocmd FileType help,* wincmd L "help windows always open vertically
|
||||||
|
|
||||||
"disable folding by default in vimdiff
|
"disable folding by default in vimdiff
|
||||||
if &diff
|
if &diff
|
||||||
|
|
Loading…
Reference in a new issue