mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-22 03:34:10 -05:00
Added the autoformat module, an associated keybinding and an entry
and list of new (optional) requirements it adds in the README, as well as making some general improvements to the README.
This commit is contained in:
parent
42ab2b62bd
commit
7f23ace6cd
4 changed files with 27 additions and 12 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -103,3 +103,6 @@
|
||||||
[submodule "vim/bundle/goyo.vim"]
|
[submodule "vim/bundle/goyo.vim"]
|
||||||
path = vim/bundle/goyo.vim
|
path = vim/bundle/goyo.vim
|
||||||
url = https://github.com/junegunn/goyo.vim.git
|
url = https://github.com/junegunn/goyo.vim.git
|
||||||
|
[submodule "vim/bundle/vim-autoformat"]
|
||||||
|
path = vim/bundle/vim-autoformat
|
||||||
|
url = https://github.com/Chiel92/vim-autoformat.git
|
||||||
|
|
33
README.md
33
README.md
|
@ -2,19 +2,28 @@
|
||||||
|
|
||||||
## Requirements ##
|
## Requirements ##
|
||||||
|
|
||||||
1. **Vim** _version_ >= _7.4_: It might work on earlier versions but all development and testing has been done here.
|
* **Vim**: The latest [vim](http://www.vim.org) should be installed to use this distribution (versions 7.3 and below aren't tested or guaranteed to work).
|
||||||
2. **Git** (_optional_): Required to clone and update the repository, and pull the plugins as submodules.
|
* **Bash**: Required by the _update_ and _gentags_ scripts.
|
||||||
3. **CTags** (_optional_): Required to generate tags needed by the tagbar plugin, as well as to have tags provided by auto-completion ([ctags website](http://ctags.sourceforge.net)).
|
* **Git**: Required by the _update_ script and git-related plugins.
|
||||||
4. **Grep and Find** (_optional_): Have grep, fgrep, egrep and agrep ([windows binaries](http://gnuwin32.sourceforge.net/packages/grep.htm)), and find and xargs ([windows binaries](http://gnuwin32.sourceforge.net/packages/findutils.htm)) in $PATH or the vim folder to use the Grep plugin commands.
|
* **Grep and Find**: Required by the _grep_ plugin.
|
||||||
6. **Powerline Fonts** (_optional_): Needed to enable the fancier looking status line ([powerline-patched fonts](https://github.com/Lokaltog/powerline-fonts)).
|
* **CTags**: Required by the _tagbar_ and _neocomplcache_ plugins as well as the _gentags_ script ([ctags website](http://ctags.sourceforge.net)).
|
||||||
5. **Bash** (_optional_): Used in the _update_ and _gentags_ scripts.
|
|
||||||
|
|
||||||
## Features ##
|
## Optional Requirements ##
|
||||||
|
|
||||||
* A custom theme that includes an original colour scheme and an ever growing collection of explicit syntax colour overrides.
|
* **Powerline Fonts**: Required to enable the fancier looking status line ([powerline-fonts repo](https://github.com/Lokaltog/powerline-fonts)).
|
||||||
* A complete default configuration that attempts to provide a useful, easy to use and modern vim experience without becoming bloated.
|
* **Artistic Style**: Required by the _autoformat_ plugin to format C, C++, C++/CLI, C#, and Java source ([astyle website](http://astyle.sourceforge.net)).
|
||||||
* Key bindings and aliases to make useful features more accessible and provide a smoother work flow while attempting to vim's default behaviour while adding behaviour.
|
* **autopep8**: Required by the _autoformat_ plugin to format Python using the PEP 8 style guide ([autopep8 repo](https://github.com/hhatto/autopep8)).
|
||||||
* A selection of plugins chosen either because they improve vim's support for common filetypes, or because they provide value-added features that aren't bloated and manage to make vim more useful as a text editor.
|
* **JS Beautifier**: Required by the _autoformat_ plugin to format Javascript source and HTML ([js-beautify repo](https://github.com/Chiel92/vim-autoformat)).
|
||||||
|
* **Tidy**: Required by the _autoformat_ plugin to format XHTML and XML ([tidy website](http://tidy.sourceforge.net)).
|
||||||
|
* **Compilers and Runtimes**: The syntastic plugin can use the compiler or runtime for most languages to provide real-time syntax checking.
|
||||||
|
|
||||||
|
## Distribution Features ##
|
||||||
|
|
||||||
|
* **Default Configuration**: A complete set of defaults, focusing on the most modern settings that still provide a compatible experience.
|
||||||
|
* **Custom theme**: An original colour scheme with explicit values set to optimize the look of individual filetypes.
|
||||||
|
* **Key Bindings/Aliases**: A set of bindings and aliases defined to group similar features and provide numerous (and sometimes more familiar) ways to access options.
|
||||||
|
* **Plugins**: A set of plugins have been included and configured to provide support for most normally-unsupported filetypes, and a set of features useful when using Vim as an editor.
|
||||||
|
* **Custom Configuration**: A second vimrc and bundle folder are included that aren't maintained as part of the repo, making custom plugins and configuration easy to add.
|
||||||
|
|
||||||
![Darkcloud Vim Distribution Theme](http://i.imgur.com/jP0EqeN.png)
|
![Darkcloud Vim Distribution Theme](http://i.imgur.com/jP0EqeN.png)
|
||||||
|
|
||||||
|
@ -30,7 +39,6 @@
|
||||||
* Create a file @ _~/.vim/darkcloud-path.vim_ and in it put the following: `let g:darkcloudpath="/etc/darkcloud-vimconfig"`, but replacing _"/etc/darkcloud-vimconfig"_ with the path to the _darkcloud-vimconfig_ repo folder.
|
* Create a file @ _~/.vim/darkcloud-path.vim_ and in it put the following: `let g:darkcloudpath="/etc/darkcloud-vimconfig"`, but replacing _"/etc/darkcloud-vimconfig"_ with the path to the _darkcloud-vimconfig_ repo folder.
|
||||||
* Place _darkcloud-vimconfig_ in the default location @ _/etc/darkcloud-vimconfig_.
|
* Place _darkcloud-vimconfig_ in the default location @ _/etc/darkcloud-vimconfig_.
|
||||||
* Create your own vimrc and have that set the _g:darkcloudpath_ variable before sourcing the included vimrc.
|
* Create your own vimrc and have that set the _g:darkcloudpath_ variable before sourcing the included vimrc.
|
||||||
* Come up with some other solution that fits your setup better than these. :)
|
|
||||||
|
|
||||||
## Configuration ##
|
## Configuration ##
|
||||||
|
|
||||||
|
@ -76,6 +84,7 @@
|
||||||
|
|
||||||
* [aftersyntaxc.vim](https://github.com/vim-scripts/aftersyntaxc.vim): C Syntax Extensions for better highlighting.
|
* [aftersyntaxc.vim](https://github.com/vim-scripts/aftersyntaxc.vim): C Syntax Extensions for better highlighting.
|
||||||
* [aspnet.vim--Abshire](https://github.com/vim-scripts/aspnet.vim--Abshire.git): Syntax highlighting for ASP.NET (asp, aspx etc).
|
* [aspnet.vim--Abshire](https://github.com/vim-scripts/aspnet.vim--Abshire.git): Syntax highlighting for ASP.NET (asp, aspx etc).
|
||||||
|
* [auto-autoformat](https://github.com/Chiel92/vim-autoformat): Provides easy code formatting in Vim by integrating existing code formatters.
|
||||||
* [autoswap.vim](https://github.com/vim-scripts/autoswap.vim): Switch to open editor window instead of asking what to do with swapfile.
|
* [autoswap.vim](https://github.com/vim-scripts/autoswap.vim): Switch to open editor window instead of asking what to do with swapfile.
|
||||||
* [breeze.vim](https://github.com/gcmt/breeze.vim.git): Provides tag matching and navigation shortcuts for HTML.
|
* [breeze.vim](https://github.com/gcmt/breeze.vim.git): Provides tag matching and navigation shortcuts for HTML.
|
||||||
* [emmet-vim](https://github.com/mattn/emmet-vim.git): Support for expanding abbreviations.
|
* [emmet-vim](https://github.com/mattn/emmet-vim.git): Support for expanding abbreviations.
|
||||||
|
|
1
vim/bundle/vim-autoformat
Submodule
1
vim/bundle/vim-autoformat
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a5ef8d6caaac80c58957f512a9f6e2983639987f
|
|
@ -105,6 +105,7 @@
|
||||||
"
|
"
|
||||||
" (formatting)
|
" (formatting)
|
||||||
" <Backspace> | (V) -> deletes currently selected text
|
" <Backspace> | (V) -> deletes currently selected text
|
||||||
|
" <Leader><C-a> | (N) -> format document using :Autoformat
|
||||||
" <Leader><C-f> | (V) -> format the selection and return to cursor
|
" <Leader><C-f> | (V) -> format the selection and return to cursor
|
||||||
" <Leader><C-f> | (N) -> format document and return to cursor
|
" <Leader><C-f> | (N) -> format document and return to cursor
|
||||||
" <Leader><C-w> | (N) -> remove whitespace
|
" <Leader><C-w> | (N) -> remove whitespace
|
||||||
|
@ -453,6 +454,7 @@
|
||||||
vnoremap <Backspace> "_x
|
vnoremap <Backspace> "_x
|
||||||
|
|
||||||
"formatting options to apply to the whole document
|
"formatting options to apply to the whole document
|
||||||
|
noremap <Leader><C-a> :Autoformat<CR><CR>:echo "The selection has been formatted with :Autoformat"<CR>
|
||||||
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
||||||
vnoremap <Leader><C-f> mz=`z<CR>:echo "The selection has been formatted"<CR>
|
vnoremap <Leader><C-f> mz=`z<CR>:echo "The selection has been formatted"<CR>
|
||||||
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
||||||
|
|
Loading…
Reference in a new issue