mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-21 14:32:32 -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"]
|
||||
path = vim/bundle/vim-polyglot
|
||||
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 ##
|
||||
|
||||
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.
|
||||
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.
|
||||
5. Powerline Fonts (optional): Required for an extended look/feel using lightline, otherwise it should be toggled off in the vimrc.
|
||||
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.
|
||||
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.
|
||||
5. **Powerline Fonts** (__optional__): Required for an extended look/feel using lightline, otherwise it should be toggled off in the vimrc.
|
||||
|
||||
## Features ##
|
||||
|
||||
|
@ -19,17 +19,19 @@
|
|||
|
||||
1. Clone the darkcloud-vimconfig repo and use the __update__ script to install the plugins:
|
||||
|
||||
`git clone https://github.com/prurigro/darkcloud-vimconfig.git`
|
||||
|
||||
`sh darkcloud-vimconfig/update`
|
||||
|
||||
* `git clone https://github.com/prurigro/darkcloud-vimconfig.git`
|
||||
* `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.
|
||||
|
||||
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__)
|
||||
* **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)
|
||||
* **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)
|
||||
|
||||
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:
|
||||
|
||||
* **s:darkcloudpath**: Set to the location of the darkcloud-vimconfig folder. (__default__: __/etc/darkcloud-vimconfig__)
|
||||
* **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.
|
||||
|
||||
## Configuration ##
|
||||
|
@ -44,8 +46,9 @@
|
|||
|
||||
## Notes ##
|
||||
|
||||
* 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__.
|
||||
* **Runtimepath**: To find the runtimepath locations currently set, run the following in vim: `:verbose set runtimepath`.
|
||||
* **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 ##
|
||||
|
||||
|
|
|
@ -38,12 +38,15 @@
|
|||
"
|
||||
" (tabs)
|
||||
" <Leader>9 | (A) -> go to the next open tab
|
||||
" <Leader>0 | (A) -> go to the previous open tab
|
||||
" <Leader>- | (A) -> open a new tab
|
||||
" <Leader>= | (A) -> create a new tab with vimfiler
|
||||
" <Leader>+ | (A) -> create a new tab with vimfiler
|
||||
" <Leader>0 | (A) -> go to the previous open tab
|
||||
" <Leader>- | (A) -> open a new tab
|
||||
" <Leader>= | (A) -> create a new tab with vimfiler
|
||||
" <Leader>+ | (A) -> create a new tab with vimfiler
|
||||
"
|
||||
" (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 left
|
||||
" <Space> | (N) -> toggle folds
|
||||
|
@ -150,17 +153,26 @@
|
|||
" <Left> | (A) -> same as k (up)
|
||||
" h | (A) -> same as k (up)
|
||||
"
|
||||
" (help)
|
||||
" q | (N) -> close the dialog
|
||||
"
|
||||
" (vimfiler)
|
||||
" <Shift-Return> | (A) -> edit the selected file
|
||||
" <LMouse><LMouse> | (A) -> edit selected file
|
||||
" <Right> | (A) -> map to l, which opens a directory
|
||||
" <Left> | (A) -> map to h, which goes up one directory
|
||||
" <LMouse> | (A) -> same as normal + justify on the left
|
||||
" <MMouse> | (A) -> same as the left mouse
|
||||
" <RMouse> | (A) -> same as the left mouse
|
||||
"
|
||||
" (vimfiler,gundo)
|
||||
" <LMouse><LMouse> | (N) -> edit selected file
|
||||
" <LMouse> | (N) -> same as normal + justify on the left
|
||||
" <MMouse> | (N) -> same as the left mouse
|
||||
" <RMouse> | (N) -> same as the left mouse
|
||||
" <Right> | (N) -> map to l, which opens a directory
|
||||
" <Left> | (N) -> map to h, which goes up one directory
|
||||
" ' | (N) -> edit the selected file
|
||||
"
|
||||
" (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:
|
||||
" :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=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
|
||||
nnoremap <Space> za
|
||||
|
||||
|
@ -381,23 +397,29 @@
|
|||
"}}}
|
||||
|
||||
"FILETYPE SPECIFIC MAPPINGS: {{{
|
||||
"gundo
|
||||
autocmd FileType gundo noremap <buffer> <LeftMouse> <LeftMouse>0l
|
||||
autocmd FileType gundo noremap <buffer> <MiddleMouse> <LeftMouse>
|
||||
autocmd FileType gundo noremap <buffer> <RightMouse> <LeftMouse>
|
||||
autocmd FileType gundo noremap <buffer> <Right> j
|
||||
autocmd FileType gundo noremap <buffer> l j
|
||||
autocmd FileType gundo noremap <buffer> <Left> k
|
||||
autocmd FileType gundo noremap <buffer> h k
|
||||
"help
|
||||
autocmd FileType help nnoremap <buffer> <silent><expr> q ':q<CR>'
|
||||
autocmd FileType help nnoremap <buffer> <silent><expr> ?? ':q<CR>'
|
||||
autocmd FileType help nnoremap <buffer> <silent><expr> ?> ':q<CR>'
|
||||
autocmd FileType help nnoremap <buffer> <silent><expr> ?< ':q<CR>'
|
||||
|
||||
"vimfiler
|
||||
autocmd FileType vimfiler noremap <buffer> <Right> l
|
||||
autocmd FileType vimfiler noremap <buffer> <Left> h
|
||||
autocmd FileType vimfiler noremap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
|
||||
autocmd FileType vimfiler noremap <buffer> <LeftMouse> <LeftMouse>0
|
||||
autocmd FileType vimfiler noremap <buffer> <MiddleMouse> <LeftMouse>
|
||||
autocmd FileType vimfiler noremap <buffer> <RightMouse> <LeftMouse>
|
||||
autocmd FileType vimfiler noremap <S-CR> e
|
||||
autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
|
||||
autocmd FileType vimfiler nmap <buffer> <LeftMouse> <LeftMouse>0
|
||||
autocmd FileType vimfiler nmap <buffer> <MiddleMouse> <LeftMouse>
|
||||
autocmd FileType vimfiler nmap <buffer> <RightMouse> <LeftMouse>
|
||||
autocmd FileType vimfiler nmap <Right> l
|
||||
autocmd FileType vimfiler nmap <Left> h
|
||||
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: {{{
|
||||
|
@ -421,7 +443,6 @@
|
|||
autocmd Filetype gundo,vimfiler noremap <S-l> <Nop>
|
||||
autocmd Filetype gundo,vimfiler noremap <S-Left> <Nop>
|
||||
autocmd Filetype gundo,vimfiler noremap <S-h> <Nop>
|
||||
|
||||
"}}}
|
||||
|
||||
"ALIASES: COMMAND SHORTCUTS {{{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
let g:use_emmet_complete_tag=1
|
||||
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")
|
||||
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
|
||||
|
@ -105,7 +105,11 @@
|
|||
call lightline#update()
|
||||
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)
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'darkcloud',
|
||||
|
@ -163,6 +167,10 @@
|
|||
"}}}
|
||||
|
||||
"SYNTASTIC: CONFIGURE SYNTAX CHECKING {{{
|
||||
if !exists("g:autostartchecker")
|
||||
let g:autostartchecker=1
|
||||
endif
|
||||
|
||||
if (g:autostartchecker == 1)
|
||||
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
|
||||
let g:syntastic_check_on_open=1
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
autocmd FileType gitcommit,notes,mail,notmuch,text setlocal spell
|
||||
autocmd FileType notes,mail,notmuch,mkd,text setlocal nonumber
|
||||
autocmd FileType mail,notmuch,text setlocal wrap
|
||||
autocmd FileType help,* wincmd L "help windows always open vertically
|
||||
|
||||
"disable folding by default in vimdiff
|
||||
if &diff
|
||||
|
|
Loading…
Reference in a new issue