Repository: luan/vimfiles
Branch: master
Commit: 5a96a28f2c0e
Files: 55
Total size: 96.4 KB
Directory structure:
gitextract_1ncepq4u/
├── .gitignore
├── .gitmodules
├── .travis.yml
├── .vintrc.yaml
├── CNAME
├── Plug.vim
├── README.md
├── UltiSnips/
│ └── go.snippets
├── bin/
│ ├── install
│ └── update
├── config/
│ ├── basic.vim
│ ├── bindings.vim
│ ├── colors.vim
│ ├── lang/
│ │ ├── c.vim
│ │ ├── crontab.vim
│ │ ├── elm.vim
│ │ ├── golang.vim
│ │ ├── javascript.vim
│ │ ├── markdown.vim
│ │ ├── ruby.vim
│ │ ├── rust.vim
│ │ ├── vue.vim
│ │ └── yaml.vim
│ ├── paste.vim
│ └── plugin/
│ ├── ack.vim
│ ├── airline.vim
│ ├── ale.vim
│ ├── autoformat.vim
│ ├── better-whitespace.vim
│ ├── ctrlp.vim
│ ├── fugitive.vim
│ ├── fzf.vim
│ ├── goyo.vim
│ ├── livedown.vim
│ ├── multicursor.vim
│ ├── ncm.vim
│ ├── nerdtree.vim
│ ├── signify.vim
│ ├── tagbar.vim
│ ├── tcomment.vim
│ ├── ultisnips.vim
│ └── undotree.vim
├── gvimrc
├── index.html
├── lib/
│ ├── autocommands.vim
│ ├── functions.vim
│ └── watchforchanges.vim
├── params.json
├── scripts/
│ ├── gotags
│ └── test
├── stylesheets/
│ ├── github-light.css
│ ├── normalize.css
│ └── stylesheet.css
├── tmp/
│ └── .gitignore
└── vimrc
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*~
.DS_Store
.cache
.netrwhist
.rake_tasks~
.undo/*
autoload/
bin/elm-format
bundle/
ftplugin/
gobin/
gopath/
gotags/
plugged/
sessions/
tags
view/
.netrwbook
================================================
FILE: .gitmodules
================================================
[submodule "scripts/shell-colors-vim-hybrid"]
path = scripts/shell-colors-vim-hybrid
url = https://gist.github.com/0d27cb34e81af344d742.git
[submodule "scripts/base16-shell"]
path = scripts/base16-shell
url = https://github.com/chriskempson/base16-shell.git
================================================
FILE: .travis.yml
================================================
dist: trusty
sudo: false
env:
global:
- DEPS=$HOME/deps
- PATH=$DEPS/bin:$PATH
addons: { apt: { packages: [python3-dev] } }
matrix:
include:
- env: ENV=neovim
- env: ENV=vim8
install: |
pyenv global 3.6
mkdir -p ${DEPS}/bin
pip3 install vim-vint
if [ "$ENV" == "vim8" ]; then
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui "
case "$ENV" in
python)
C_OPTS+=--enable-pythoninterp
;;
python3)
C_OPTS+=--enable-python3interp
;;
ruby*)
C_OPTS+=--enable-rubyinterp
;;
esac
git clone --depth 1 https://github.com/vim/vim
cd vim
./configure $C_OPTS
make
make install
cd -
elif [ "$ENV" == "neovim" ]; then
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64" ||
pip3 install neovim
ln -s $(which nvim) ${DEPS}/bin/vim
fi
script: scripts/test
================================================
FILE: .vintrc.yaml
================================================
cmdargs:
severity: style_problem
color: true
env:
neovim: true
policies:
# this doesn't seem to work very reliably
ProhibitEncodingOptionAfterScriptEncoding:
enabled: false
================================================
FILE: CNAME
================================================
vimfiles.luan.sh
================================================
FILE: Plug.vim
================================================
call plug#begin('~/.vim/plugged')
" Defaults {{{
Plug 'tpope/vim-sensible'
" }}}
" Navigation {{{
" Displays tags in a window, ordered by scope
Plug 'majutsushi/tagbar'
" A tree explorer plugin for vim
Plug 'scrooloose/nerdtree'
" combine with netrw to create a delicious salad dressing
Plug 'tpope/vim-vinegar'
" project configuration via 'projections'
Plug 'tpope/vim-projectionist'
" A command-line fuzzy finder written in Go
let g:fzf_command_prefix = 'FZF'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Active fork of kien/ctrlp.vim. Fuzzy file, buffer, mru, tag, etc finder.
Plug 'ctrlpvim/ctrlp.vim'
" }}}
" UI Additions {{{
" Colors {{{
Plug 'dolio/vim-hybrid'
Plug 'morhetz/gruvbox'
Plug 'chriskempson/base16-vim'
Plug 'mhartington/oceanic-next'
Plug 'ayu-theme/ayu-vim'
" }}}
" lean & mean status/tabline for vim that's light as air
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Show a diff via Vim sign column.
Plug 'mhinz/vim-signify'
" Plugin to toggle, display and navigate marks
Plug 'kshenoy/vim-signature'
" Better whitespace highlighting for Vim
Plug 'ntpeters/vim-better-whitespace'
" Toggle the cursor shape in the terminal for Vim.
Plug 'jszakmeister/vim-togglecursor'
" }}}
" Commands {{{
function! InstallVipe(info)
if a:info.status ==# 'installed' || a:info.force
if has('unix')
let s:uname = system('uname -s')
if s:uname =~? 'Darwin'
silent !rm -f /usr/local/bin/vipe
silent !ln -s `pwd`/vipe /usr/local/bin || true
else
silent !ln -s `pwd`/vipe ~/bin || true
endif
endif
endif
endfunction
function! InstallVimProc(info)
if a:info.status ==# 'installed' || a:info.force
if has('unix')
let s:uname = system('uname -s')
if s:uname =~? 'Darwin'
silent !make -f make_mac.mak
elseif s:uname =~? 'Linux'
silent !make
else
silent !gmake
endif
elseif has('win32unix')
silent !make -f make_cygwin.mak
elseif has('win32')
silent !tools\update-dll-mingw
endif
endif
endfunction
" asynchronous process manager; run :VimProcBang to run a command and echo the results
Plug 'Shougo/vimproc.vim', { 'do': function('InstallVimProc') }
" comment stuff out (via leader-/)
Plug 'tomtom/tcomment_vim'
" quoting/parenthesizing made simple; e.g. ysiw) to wrap word in parens
Plug 'tpope/vim-surround'
" a Git wrapper so awesome, it should be illegal; :Gblame, etc
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
" easily search for, substitute, and abbreviate multiple variants of a word
Plug 'tpope/vim-abolish'
" Vim sugar for the UNIX shell commands that need it the most; e.g. :Find, :Wall
Plug 'tpope/vim-eunuch'
" Run a command over every entry in the quickfix list (:Cdo) or location list (:Ldo).
Plug 'Peeja/vim-cdo'
" Vim script for text filtering and alignment; e.g. :Tabularize /,
Plug 'godlygeek/tabular'
" Vim plugin for the Perl module / CLI script 'ack'
Plug 'mileszs/ack.vim'
" Send test commands to a pipe.
Plug 'luan/vipe', { 'do': function('InstallVipe') }
" Asynchronous Lint Engine
Plug 'w0rp/ale'
" Functions to toggle the [Location List] and the [Quickfix List] windows.
Plug 'milkypostman/vim-togglelist'
" True Sublime Text style multiple selections for Vim
Plug 'terryma/vim-multiple-cursors'
" Add emacs/bash/cocoa key bindings to vim, in insert and command-line modes.
Plug 'maxbrunsfeld/vim-emacs-bindings'
" The ultimate undo history visualizer for VIM
Plug 'mbbill/undotree'
" Distraction-free writing in Vim
Plug 'junegunn/goyo.vim'
" All the world's indeed a stage and we are merely players
Plug 'junegunn/limelight.vim'
" Make ^a and ^x work properly with dates
Plug 'tpope/vim-speeddating'
" }}}
" Automatic Helpers {{{
" wisely add "end" in ruby, endfunction/endif/more in vim script, etc
Plug 'tpope/vim-endwise'
" enable repeating supported plugin maps with '.'
Plug 'tpope/vim-repeat'
" automatically adjusts 'shiftwidth' and 'expandtab' heuristically based on the current file
Plug 'tpope/vim-sleuth'
" pairs of handy bracket mappings; e.g. [<Space> and ]<Space> add newlines before and after the cursor line
Plug 'tpope/vim-unimpaired'
" Reorder delimited items
Plug 'machakann/vim-swap'
" Simplifies the transition between multiline and single-line code
Plug 'AndrewRadev/splitjoin.vim'
" Dark powered asynchronous completion framework for neovim/Vim8
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'zchee/deoplete-clang' " C/C++
Plug 'zchee/deoplete-go' " Golang
Plug 'sebastianmarkow/deoplete-rust' " Rust
Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' } " Javascript
Plug 'Shougo/neco-syntax'
Plug 'Shougo/neco-vim'
let g:deoplete#enable_at_startup = 1
" Clang based syntax highlighting for Neovim
Plug 'arakashic/chromatica.nvim'
if !has('nvim') || $ALL_PLUGINS ==# 'true'
Plug 'roxma/vim-hug-neovim-rpc'
endif
" Provide easy code formatting in Vim by integrating existing code formatters.
Plug 'Chiel92/vim-autoformat'
" displays information in echo area from echodoc plugin.
Plug 'Shougo/echodoc.vim'
" Make Vim persist editing state without fuss
Plug 'kopischke/vim-stay'
" Make Vim handle line and column numbers in file names with a minimum of fuss
Plug 'kopischke/vim-fetch'
" Speed up Vim by updating folds only when called-for.
Plug 'Konfekt/FastFold'
" }}}
" Text objects {{{
" allows you to configure % to match more than just single characters
Plug 'vim-scripts/matchit.zip'
" Create your own text objects
Plug 'kana/vim-textobj-user'
" Underscore text-object for Vim
Plug 'lucapette/vim-textobj-underscore'
" custom text object for selecting ruby blocks
Plug 'nelstrom/vim-textobj-rubyblock'
" A convenient text object for last pasted text
Plug 'saaguero/vim-textobj-pastedtext'
"Text objects for functions
Plug 'kana/vim-textobj-function'
" A Vim text object for ERB blocks.
Plug 'whatyouhide/vim-textobj-erb'
" Vim plugin that provides additional text objects
Plug 'wellle/targets.vim'
" Text objects for foldings
Plug 'kana/vim-textobj-fold'
" }}}'
" Snippets {{{
"UltiSnips - The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips!
if has('python') || has('python3')
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
endif
" }}}
" Language specific {{{
" Ruby {{{
Plug 'tpope/vim-rails', { 'for': ['ruby', 'rake'] }
Plug 'tpope/vim-rake', { 'for': ['ruby', 'rake'] }
Plug 'tpope/vim-bundler', { 'for': ['ruby', 'rake'] }
Plug 'ecomba/vim-ruby-refactoring', { 'for': ['ruby', 'rake'] }
Plug 'tpope/vim-cucumber', { 'for': ['cucumber'] }
" }}}
" Clojure {{{
Plug 'tpope/vim-classpath'
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'tpope/vim-salve', { 'for': 'clojure' }
Plug 'guns/vim-sexp', { 'for': 'clojure' }
Plug 'tpope/vim-sexp-mappings-for-regular-people', { 'for': 'clojure' }
" }}}
" Go {{{
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
" }}}
" Markdown {{{
Plug 'tpope/vim-markdown', { 'for': 'markdown' }
Plug 'shime/vim-livedown', { 'for': 'markdown' }
" }}}
" JavaScript {{{
Plug 'othree/yajs.vim'
Plug 'othree/es.next.syntax.vim'
Plug 'othree/javascript-libraries-syntax.vim'
Plug 'ternjs/tern_for_vim', {'do': 'npm install'}
Plug 'mxw/vim-jsx'
" }}}
" TypeScript {{{
Plug 'leafgarland/typescript-vim'
" }}}
" Vue {{{
Plug 'posva/vim-vue', { 'for': 'vue' }
" }}}
" CSS / HTML {{{
Plug 'othree/html5.vim'
Plug 'mattn/emmet-vim'
Plug 'cakebaker/scss-syntax.vim'
Plug 'hail2u/vim-css3-syntax'
Plug 'gregsexton/MatchTag'
" }}}
" VimL {{{
Plug 'ynkdir/vim-vimlparser', { 'for': 'vim' }
Plug 'syngan/vim-vimlint', { 'for': 'vim' }
" }}}
" Fish {{{
Plug 'dag/vim-fish', { 'for': 'fish' }
" }}}
" Elm {{{
Plug 'elmcast/elm-vim', { 'for': 'elm' }
" }}}
" Rust {{{
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
" }}}
" Misc {{{
Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'keith/tmux.vim'
Plug 'kurayama/systemd-vim-syntax'
Plug 'iloginow/vim-stylus'
Plug 'chr4/nginx.vim'
Plug 'uarun/vim-protobuf'
Plug 'peterhoeg/vim-qml'
Plug 'keith/rspec.vim'
Plug 'hashivim/vim-terraform'
Plug 'PProvost/vim-ps1'
Plug 'ciaranm/securemodelines' " Secure modeline https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md
Plug 'jceb/vim-orgmode'
" }}}
" }}}
source $HOME/.vimrc.local.plugins
call plug#end()
================================================
FILE: README.md
================================================
# The Vim Configuration. [](https://travis-ci.org/luan/vimfiles)
If you're trying to use this config checkout this [cheat
sheet](https://github.com/luan/vimfiles/wiki/Luan's-Vim-Cheat-Sheet).
---
This vimfiles support both standard [vim](http://www.vim.org/) and
[neovim](https://neovim.io/), I'd encourage you to give neovim a try.
If you're using neovim follow [this
guide](https://github.com/neovim/neovim/wiki/Installing-Neovim) in order to get
it properly setup. The autocompletion plugin we use needs [python3
support](https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim) too.
If you choose regular vim you can install it on ubuntu via the `vim-nox` package, or
on macOS with Homebrew via `brew install vim`.
### Table of Contents
1. [Using This Configuration](#using-this-configuration)
1. [Installation](#installation)
1. [Additional Dependencies](#additional-dependencies)
1. [ctags](#ctags)
1. [Updating](#updating)
1. [Customizing](#customizing)
1. [Changing Configuration](#changing-configuration)
1. [Adding Plugins](#adding-plugins)
1. [Functionality](#functionality)
1. [Defaults Overridden](#defaults-overridden)
1. [Screenshots](#screenshots)
## Using This Configuration
This configuration is supposed to be used directly, **not** forked. If you intend
to keep up to date with changes made to this repo it's recommended that you
just clone this repository and customize the config using the [provided
hooks](#customizing). If you have a feature or fix to submit, feel free to fork
and send a PR.
---
## Installation
As simple as:
```bash
curl vimfiles.luan.sh/install | bash
# To override you current config:
# curl vimfiles.luan.sh/install | FORCE=1 bash
```
### Additional Dependencies
Most of the dependencies are installed automatically, assuming you have a
minimal development environment for you language. For example we download all
the tools for golang and elm automatically. `git` is assumed to be installed
and so is [`ag`](https://github.com/ggreer/the_silver_searcher) or `ack`, if either of those is not, some plugins may not behave
as expected.
#### ctags
`ctags` is used to jump to function definitions, it is not strictly necessary if
you don't need that functionality, if you want to be able to jump effectively
to definitions install the correct version of ctags.
**OSX**
```bash
brew uninstall ctags
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
```
**Linux**
*exuberant-ctags* from your OS is generally enough for most things, but if you
want more CSS, ruby and other goodnesses you will need to manually compile and
replace your ctags installation with: https://github.com/fishman/ctags
---
## Updating
You should frequently update you copy of this config, to get latest fixes and
improvements. To do so you can run:
```bash
vim-update
```
Assuming `/usr/local/bin` is on your `PATH` on OSX or `~/bin/` on Linux.
If that doesn't work you can always run the script directly:
```bash
~/.vim/update
```
On 11/18/2018 the Python package `neovim` was renamed to `pynvim`
Due to issues with pip the `neovim` pip package cannot be upgraded and will break neovim's python bindings.
To resolve this you can run
```bash
pip uninstall neovim pynvim
pip install pynvim
```
See https://github.com/neovim/neovim/wiki/Following-HEAD#20181118 for more details
---
## Customizing
We load 3 extra configuration files that are **NOT** part of this repo:
* `~/.vimrc.local.before` (*to open: `,vb`*): Configuration to be set before everything else, this
runs before any plugin or any config from this repository.
* `~/.vimrc.local` (*to open: `,vl`*): Configuration to be set after everything else, this runs
after all other configuration is loaded and all plugins are setup.
* `~/.vimrc.local.plugins` (*to open: `,vp`*): Extra plugins to be loaded (along with maybe
optional configuration for them). Is loaded after all the default plugins are
installed.
A common pattern is for individuals or teams to have those 3 files checked in
to a separate [dotfiles](https://github.com/luan/dotfiles) repository and have
them be symlinked into your `$HOME` directory. Symlink them before you run the
install script and everything should work.
### Changing Configuration
You might want to change some config such as disabling autocompletion or
enabling auto save, or maybe just changing your colorscheme. You can do so by
editing the `~/.vimrc.local` file, for example:
Changing colorscheme:
```vim
colorscheme gruvbox
```
Enabling auto save:
```vim
" will save automatically when leaving the buffer
" 0 or 1, defaults 0
let g:autosave = 1
```
Disabling deoplete:
```vim
let g:deoplete#enable_at_startup = 0 " disable deoplete
```
Some configuration values need to be set before loading plugins, for that we
have the `~/.vimrc.local.before`, that get's loaded before everything else, one
example usage of it is enabling fancy characters for the airline plugin:
```vim
let g:airline_powerline_fonts = 1
```
### Adding Plugins
If you have a favorite plugin you want to install but couldn't convince me to
add it as a default you can still have it be installed by just putting it in
the `~/.vimrc.local.plugins`, like such:
```vim
" Plugin to navigate between camelCase words
Plug 'bkad/CamelCaseMotion'
```
---
## Functionality
This config packs a considerable amount of plugins, there are descriptions for
most of them [here](Plug.vim) in the comments. It also strives to not override
default behavior, although that's not always possible.
There's [space to write some
guides](https://github.com/luan/vimfiles/issues/56) as to how to effectively
use this config for certain languages. The main targets are golang and ruby,
although this configuration should be usable with most languages.
### Defaults Overridden
These bindings are known to be overridden in this config. Please open an
[issue](https://github.com/luan/vimfiles/issues/new) if you find any other.
* `|`: Default behavior is jump to column. We have it set to `:NERDTreeFocus`.
* `,`: Default is reverse repeat a `f`, `t`, `F`, or `T` search. We have it set to `<leader>`.
* `\`: Is the default `<leader>`. We have it set to `:NERDTreeToggle`.
* `<enter>` or `<cr>`: Default behavior is to move the cursor one line down. We
have it set to save if modified (basically `:w` when the file has a change).
A lot of small defaults are overridden everywhere else, and those are just to
make editing a better experience and should in no way make this vim not feel
like vim. For a glance in some of the changes look at
[config/basic.vim](config/basic.vim).
A few overridden are worth mentioning:
```vim
set splitright
```
These change where new splits are open, when you for example do `:vs` the
default behavior is to open a split on the left, it feels more natural to open
one on the right instead.
```vim
set iskeyword+=$,@,-
```
Add extra characters that are valid parts of variables.
---
## Screenshots
**Default colorscheme: hybrid**
[](https://github.com/luan/vimfiles/raw/master/screenshots/hybrid.png)
**Alternate colorscheme: monokai**
[](https://github.com/luan/vimfiles/raw/master/screenshots/monokai.png)
================================================
FILE: UltiSnips/go.snippets
================================================
# More snippets for Go
snippet println "fmt.Println(...)"
fmt.Println(${0:${VISUAL}})
endsnippet
snippet printf "fmt.Printf(format, ...)"
fmt.Printf("${1:%s}", ${0:${VISUAL}})
endsnippet
snippet iferr "if err != nil {...}"
if err != nil {
${0}
}
endsnippet
snippet desc "Ginkgo Describe" b
Describe("${1:something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet cont "Ginkgo Context" b
Context("${1:something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet when "Ginkgo When" b
When("${1:something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet bef "Ginkgo BeforeEach" b
BeforeEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet aft "Ginkgo AfterEach" b
AfterEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet just "Ginkgo JustBeforeEach" b
JustBeforeEach(func() {
${0:${VISUAL}}
})
endsnippet
snippet it "Ginkgo It" b
It("${1:does something}", func() {
${0:${VISUAL}}
})
endsnippet
snippet exto "Gomega Expect(...).To(...)" b
Expect(${1:actual}).To(${0:${VISUAL}})
endsnippet
snippet exnt "Gomega Expect(...).NotTo(...)" b
Expect(${1:actual}).NotTo(${0:${VISUAL}})
endsnippet
snippet extn "Gomega Expect(...).ToNot(...)" b
Expect(${1:actual}).ToNot(${0:${VISUAL}})
endsnippet
snippet exeo "Gomega Expect(err).To(HaveOccurred())" b
Expect(err).To(HaveOccurred())
endsnippet
snippet exen "Gomega Expect(err).NotTo(HaveOccurred())" b
Expect(err).NotTo(HaveOccurred())
endsnippet
snippet exme "Gomega Expect(err).To(MatchError(...))" b
Expect(err).To(MatchError(${0:"something failed"}))
endsnippet
snippet exes "Gomega Expect(err).To(MatchError(ContainSubstring(...)))" b
Expect(err).To(MatchError(ContainSubstring(${0:"something failed"})))
endsnippet
# vim:ft=snippets:
================================================
FILE: bin/install
================================================
#!/usr/bin/env bash
set -eu -o pipefail
declare UPDATE=0 INTERACTIVE=1
declare VIMCMD='vim'
declare NPM='npm'
declare PIP='pip'
readonly VIMFILES_PATH="${HOME}/.vim"
readonly VIMFILES_REPO_NAME='luan/vimfiles'
readonly VIMFILES_REPO_URL="https://github.com/${VIMFILES_REPO_NAME}"
readonly FILES_TO_LINK="vimrc gvimrc"
readonly LOCALS=".vimrc.local.before .vimrc.local .vimrc.local.plugins"
readonly GREEN='\033[0;32m'
readonly YELLOW='\033[0;33m'
readonly RED='\033[0;31m'
readonly BOLD=$(tput bold)
readonly NORMAL=$(tput sgr0)
readonly END_COLOR='\033[0;m'
DEBUG=${DEBUG:-}
if [[ ${DEBUG} ]]; then
set -x
fi
print_usage() {
echo -e "Unsupported option: $*"
echo -e "Supported options:"
echo -e "\\t-u, --update \\tUpdate all plugins."
echo -e "\\t-n, --non-interactive \\tDon't show vim while installing plugins."
}
parse_flags() {
if [[ -t 0 ]]
then
INTERACTIVE=1
else
echo "Detected non-interactive shell, forcing --non-interactive"
INTERACTIVE=0
fi
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-n|--non-interactive)
INTERACTIVE=0
shift
;;
-u|--update)
UPDATE=1
shift
;;
*)
print_usage "$key"
exit 1
;;
esac
done
readonly INTERACTIVE UPDATE
}
fail() {
declare message=$1
echo -e "${RED}${BOLD}${message}${NORMAL}"
exit 1
}
from_repo() {
declare dir=$1
(
[[ -d "${dir}" ]] && cd "${dir}" || return 1
[[ -e "${dir}/.git" && "$(git remote -v)" == *"${VIMFILES_REPO_NAME}"* ]]
)
}
has_neovim() {
which nvim > /dev/null
}
has_go() {
which go > /dev/null
}
has_elm() {
which elm > /dev/null
}
must_have_pip3() {
if which pip3 > /dev/null; then
PIP=pip3
return
elif which pip > /dev/null; then
PIP=pip
return
fi
echo -e "\\t${RED}ERROR${END_COLOR} You need python3 with pip installed in" \
"order for this configuration to work. Please make sure to install" \
"python3 on your system and run this intaller again."
exit 1
}
has_npm() {
if which npm > /dev/null; then
if [[ $(which npm) == '/usr/bin/npm' ]]; then
NPM='sudo npm'
fi
return 0
fi
return 1
}
setup_vimfiles_dir() {
declare script_name=$0
local dir
dir="$(cd "$(dirname "${script_name}")" && pwd)"
if [[ "$(basename "${dir}")" == "bin" ]]; then
dir="$(cd "${dir}"/.. && pwd)"
fi
if ! from_repo "${dir}"; then
echo "vimfiles repository not yet cloned. Cloning..."
dir="${VIMFILES_PATH}"
git clone "${VIMFILES_REPO_URL}" "${dir}"
fi
if [[ "${dir}" != "${VIMFILES_PATH}" ]]; then
if [[ ! -e "${VIMFILES_PATH}" ]]; then
echo "Detected clone outside of ~/.vim, symlinking"
ln -s "${dir}" "${VIMFILES_PATH}"
fi
fi
}
setup_neovim_config() {
mkdir -p "${XDG_CONFIG_HOME:="${HOME}/.config"}"
if [[ ! -e "${XDG_CONFIG_HOME}/nvim" ]]; then
ln -s "${VIMFILES_PATH}" "${XDG_CONFIG_HOME}/nvim"
fi
}
initialize_vimfiles() {
(
cd "${VIMFILES_PATH}" || exit 2
if [ -e bundle ]; then
rm -rf bundle
fi
git submodule update --init --recursive
for file in ${LOCALS}; do
dot_file="${HOME}/${file}"
touch "${dot_file}"
done
for file in ${FILES_TO_LINK}; do
dot_file="${HOME}/.${file}"
if [[ ! -e "${dot_file}" ]]; then
ln -s "${PWD}/${file}" "${dot_file}"
fi
done
)
}
install_vim_update() {
local install_path
if [[ "$(uname)" == "Darwin" ]]; then
install_path=/usr/local/bin
elif [[ "$(uname)" == *"Linux"* ]]; then
install_path="${HOME}/bin"
fi
if [[ -L "${install_path}/vim-update" ]]; then
rm -f "${install_path}/vim-update"
fi
if [[ ! -L "${install_path}/vim-update" ]]; then
mkdir -p "${install_path}"
ln -s "${VIMFILES_PATH}/bin/update" "${install_path}/vim-update"
fi
}
setup_elm_dependencies() {
echo -e "${YELLOW}INSTALL${END_COLOR} ${BOLD}elm${NORMAL} dependencies..."
if has_npm; then
npmpackages="\
elm-test \
elm-oracle \
"
for p in $npmpackages; do
(
echo -e "\\t${YELLOW}INSTALL${END_COLOR} ${BOLD}${p}${NORMAL}..."
if $NPM install -g "${p}"; then
echo -e "\\t${GREEN}DONE${END_COLOR} ${BOLD}${p}${NORMAL}"
else
echo -e "\\t${RED}ERROR${END_COLOR} ${BOLD}${p}${NORMAL}"
fi
) &
done
else
echo -e "\\t${RED}ERROR${END_COLOR} ${BOLD}NPM not found, some elm dependencies were skipped${NORMAL}!"
fi
(
echo -e "\\t${YELLOW}INSTALL${END_COLOR} ${BOLD}elm-format${NORMAL}..."
if [[ "$OSTYPE" == "linux-gnu" ]]; then
elm_format_url='https://github.com/avh4/elm-format/releases/download/0.2.0-alpha/elm-format-0.2.0-alpha-linux-x64.tgz'
elif [[ "$OSTYPE" == "darwin"* ]]; then
elm_format_url='https://github.com/avh4/elm-format/releases/download/0.2.0-alpha/elm-format-0.2.0-alpha-mac-x64.tgz'
fi
tar xz -O < <(curl -L $elm_format_url) > bin/elm-format
chmod a+x bin/elm-format
echo -e "\\t${GREEN}DONE${END_COLOR} ${BOLD}elm-format${NORMAL}"
) &
wait
echo -e "${GREEN}DONE${END_COLOR} ${BOLD}elm${NORMAL} dependencies"
}
setup_livedown() {
$NPM install -g livedown
}
setup_neovim_python3() {
if which pacman > /dev/null ; then
sudo $PIP uninstall -y greenlet 2>/dev/null >/dev/null || true
sudo pacman -S --needed --noconfirm python-greenlet
sudo $PIP install --upgrade neovim
return 0
fi
$PIP install --upgrade neovim
}
setup_vim_calls() {
if has_neovim; then
VIMCMD=nvim
fi
exec 4>&1 3>/dev/null
if [[ $INTERACTIVE != 1 ]] ; then
if has_neovim; then
VIMCMD='nvim --headless'
else
exec 4>&1 1>&3 2>&3
fi
fi
}
setup_go_dependencies() {
(
cd "${VIMFILES_PATH}" || exit 2
mkdir -p gobin gopath
echo -e "${YELLOW}INSTALL${END_COLOR} ${BOLD}go binaries${NORMAL} (may take a while)..." >&4
GOPATH="${PWD}/gopath" ${VIMCMD} +'GoUpdateBinaries' +'qall!'
echo
echo -e "${GREEN}DONE${END_COLOR} ${BOLD}go binaries${NORMAL}" >&4
set +e
GOPATH="${PWD}/gopath" GOBIN="${PWD}/gobin" "${PWD}/gobin/gocode" close 2>/dev/null
set -e
)
}
install_plugins() {
echo -e "${YELLOW}INSTALL${END_COLOR} ${BOLD}vim plugins${NORMAL} (may take a while)..."
ALL_PLUGINS='true' ${VIMCMD} +'PlugClean!' +'PlugUpdate!' +'qall!'
if has_neovim; then
${VIMCMD} +'UpdateRemotePlugins' +'qall!'
echo
fi
echo -e "${GREEN}DONE${END_COLOR} ${BOLD}vim plugins${NORMAL}" >&4
}
main() {
parse_flags "$@"
setup_vimfiles_dir
has_neovim && setup_neovim_config
initialize_vimfiles
install_vim_update
has_elm && setup_elm_dependencies
has_npm && setup_livedown
must_have_pip3
setup_neovim_python3
setup_vim_calls
install_plugins
has_go && setup_go_dependencies
return 0
}
main "$@"
================================================
FILE: bin/update
================================================
#!/usr/bin/env bash
pushd $HOME/.vim > /dev/null
git pull
~/.vim/bin/install -u $@
popd > /dev/null
================================================
FILE: config/basic.vim
================================================
" ----------------------------------------
" Regular Vim Configuration (No Plugins Needed)
" ----------------------------------------
" Config {{{
if has('persistent_undo')
set undofile
set undodir=~/.vim/.undo
endif
" We rely on bash for some things, make sure we use that for shelling out
set shell=/bin/bash
" Prevent netrw buffers from being set as alternate
let g:netrw_altfile = 1
" }}}
" Backups {{{
set swapfile " Keep swapfiles
set directory=~/.vim-tmp,~/tmp,/var/tmp,/tmp
set backupdir=~/.vim-tmp,~/tmp,/var/tmp,/tmp
" }}}
" UI {{{
set number " Line numbers on
set nowrap " Line wrapping off
set cmdheight=1 " Make the command area two lines high
set noshowmode " don't need to show mode since we have airline
set numberwidth=4
set encoding=utf-8
set guioptions=cg
set guicursor=n-v-c:block-Cursor-blinkon0,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor,r-cr:hor20-Cursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175
if !has('nvim')
set ttyfast
endi
set lazyredraw
if !has('nvim')
if has('mouse_sgr')
set ttymouse=sgr
else
set ttymouse=xterm2
end
end
" }}}
" Behaviors {{{
filetype plugin indent on " Automatically detect file types. (must turn on after Vundle)
set wildmode=list:longest " use emacs-style tab completion when selecting files, etc
set hidden " Change buffer - without saving
set autowriteall " Writes on make/shell commands
set foldlevelstart=99
set formatoptions=crql
set iskeyword+=$,@,- " Add extra characters that are valid parts of variables
set tags=./tags;/,tags;/
set splitright
if v:version >= 704
set completeopt=menu,noinsert,noselect
endif
set viewoptions=cursor,folds,slash,unix
set scrolloff=5
" }}}
" Security {{{
set nomodeline
" }}}
" Text Format {{{
set tabstop=2
set shiftwidth=2 " Tabs under smart indent
set expandtab
" }}}
" Searching {{{
set ignorecase
set smartcase " Non-case sensitive search
set hlsearch
set wildignore+=.final_builds/*,*/node_modules/*,*.o,*.obj,*.exe,*.so,*.dll,*.pyc,.svn,.hg,.bzr,.git,.sass-cache,*.class,*.scssc,*/Godeps/*
if executable('rg')
set grepprg=rg\ --vimgrep
elseif executable('ag')
set grepprg=ag\ --nogroup\ --column\ --smart-case\ --nocolor\ --follow
set grepformat=%f:%l:%c:%m
elseif executable('ack')
set grepprg=ack\ --nogroup\ --column\ --smart-case\ --nocolor\ --follow\ $*
set grepformat=%f:%l:%c:%m
endif
" }}}
" Visual {{{
set noshowmatch " Disable jumping to matching bracket when typing
" }}}
" Sounds {{{
set noerrorbells
set novisualbell
" }}}
" Mouse {{{
set mousehide " Hide mouse after chars typed
set mouse=a " Mouse in all modes
" }}}
================================================
FILE: config/bindings.vim
================================================
" ----------------------------------------
" Bindings
" ----------------------------------------
" Note: This line MUST come before any <leader> mappings
let g:mapleader=','
let g:maplocalleader = '-'
" Basics {{{
set pastetoggle=<F6>
map <F6> :set invpaste<CR>:set paste?<CR>
" Edit vimrc with ,vi
nmap <silent> <leader>vi :e ~/.vim/vimrc<CR>
nmap <silent> <leader>vb :e ~/.vimrc.local.before<CR>
nmap <silent> <leader>vl :e ~/.vimrc.local<CR>
nmap <silent> <leader>vp :e ~/.vimrc.local.plugins<CR>
nnoremap j gj
nnoremap k gk
noremap <c-\> ,
" }}}
" Common typos {{{
command! W w
command! Q q
command! WQ wq
command! Wq wq
nnoremap <silent> <C-Right> <c-w>l
nnoremap <silent> <C-Left> <c-w>h
nnoremap <silent> <C-Up> <c-w>k
nnoremap <silent> <C-Down> <c-w>j
" }}}
" Other {{{
vnoremap < <gv
vnoremap > >gv
" make Y consistent with C and D. See :help Y.
nnoremap Y y$
" Y in visual mode copies to system clipboard
vmap Y "+y
" }}}
" Open files in current directory {{{
cnoremap %% <C-R>=expand('%:h').'/'<cr>
nmap <leader>e :edit %%
nmap <leader>v :view %%
nnoremap <leader><leader> <c-^>
" }}}
" Switch between test and production code {{{
nnoremap <leader>. :A<cr>
" }}}
" ---------------
" Leader Commands
" ---------------
" {{{ File Jumping
"Move back and forth through previous and next buffers
"with ,z and ,x
nnoremap <silent> <leader>z :bp<CR>
nnoremap <silent> <leader>x :bn<CR>
" }}}
" Spelling {{{
" Toggle spelling mode with ,s
nmap <silent> <leader>ss :set spell!<CR>
nmap <silent> <leader>sf :QuickSpellingFix<CR>
" }}}
" Window {{{
" Window Movement
" Equal Size Windows
nmap <silent> <leader>w= :wincmd =<CR>
" Swap Windows
nmap <silent> <leader>wx :wincmd x<CR>
" Window Splitting
nmap <silent> <leader>hs :split<CR>
nmap <silent> <leader>vs :vsplit<CR>
nmap <silent> <leader>sc :close<CR>
" }}}
" Other {{{
map <leader>YY :let @* = expand("%").":".line(".")<CR>:echo "Copied: ".expand("%")<CR>
map <leader>YL :let @* = expand("%").":".line(".")<CR>:echo "Copied: ".expand("%").":".line(".")<CR>
nnoremap <silent> <space> :noh<cr>
nnoremap <leader>= gg=G``
nnoremap <unique> <expr> <CR> empty(&buftype) ? ':w<CR>' : '<CR>'
nnoremap <silent><leader><C-]> <C-w><C-]><C-w>T
" }}}
" Test runner {{{
" Run this file
map <leader>t :call RunTestFile()<cr>
" Run only the example under the cursor
map <leader>T :call RunNearestTest()<cr>
map <leader><space> :Vipe <CR>
map <leader>p :VipePop <CR>
" }}}
================================================
FILE: config/colors.vim
================================================
let g:gruvbox_italic=1
let s:colors = [
\ 'hybrid',
\ 'gruvbox',
\ 'base16-3024',
\ 'base16-apathy',
\ 'base16-ashes',
\ 'base16-atelier-dune',
\ 'base16-atelier-forest',
\ 'base16-atelier-heath',
\ 'base16-atelier-lakeside',
\ 'base16-atelier-seaside',
\ 'base16-bespin',
\ 'base16-brewer',
\ 'base16-bright',
\ 'base16-chalk',
\ 'base16-codeschool',
\ 'base16-default-dark',
\ 'base16-eighties',
\ 'base16-embers',
\ 'base16-flat',
\ 'base16-google-dark',
\ 'base16-grayscale-dark',
\ 'base16-greenscreen',
\ 'base16-harmonic-dark',
\ 'base16-isotope',
\ 'base16-marrakesh',
\ 'base16-mocha',
\ 'base16-monokai',
\ 'base16-ocean',
\ 'base16-paraiso',
\ 'base16-pop',
\ 'base16-railscasts',
\ 'base16-shapeshifter',
\ 'base16-solarized-dark',
\ 'base16-summerfruit-dark',
\ 'base16-tomorrow',
\ 'base16-twilight',
\ ]
function! colors#_change(index)
let l:idx = a:index
if l:idx < 0
let l:idx = len(s:colors) - 1
elseif l:idx > len(s:colors) - 1
let l:idx = 0
endif
let l:name = s:colors[l:idx]
silent! execute 'colorscheme '.l:name
endfunction
function! colors#_callback()
hi MatchParen cterm=underline ctermbg=none ctermfg=none gui=underline guifg=NONE guibg=NONE
endfunction
function! colors#next()
let l:next_index = index(s:colors, g:colors_name) + 1
call colors#_change(l:next_index)
endfunction
function! colors#prev()
let l:prev_index = index(s:colors, g:colors_name) - 1
call colors#_change(l:prev_index)
endfunction
function! colors#toggle_background()
if &background ==# 'light'
set background=dark
else
set background=light
endif
endfunction
function! colors#peek()
echo g:colors_name . ' - ' . &background
endfunction
command! ColorsPrev call colors#prev()
command! ColorsNext call colors#next()
command! ColorsToggleBG call colors#toggle_background()
command! ColorsPeek call colors#peek()
map <silent><F2> :ColorsPrev<cr>
map <silent><F3> :ColorsNext<cr>
map <silent><F4> :ColorsToggleBG<cr>
map <silent><F1> :ColorsPeek<cr>
set background=dark
if has('termguicolors')
set termguicolors
if &term =~# '^screen' || &term =~# '^tmux'
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
endif
endif
augroup luan_colors
autocmd! ColorScheme * silent! call colors#_callback()
augroup END
try
colorscheme hybrid
catch
endtry
================================================
FILE: config/lang/c.vim
================================================
let s:projections = {
\ '*.c': {'type': 'c', 'alternate': ['{}.h']},
\ '*.h': {'type': 'c', 'alternate': ['{}.c']},
\ '*.cpp': {'type': 'cpp', 'alternate': ['{}.hpp']},
\ '*.hpp': {'type': 'cpp', 'alternate': ['{}.cpp']},
\ '*': {}
\ }
function! s:ProjectionistDetect() abort
if &filetype ==# 'c' || &filetype ==# 'cpp'
let l:projections = deepcopy(s:projections)
call projectionist#append(getcwd(), l:projections)
endif
endfunction
augroup luan_c
autocmd!
autocmd User ProjectionistDetect call s:ProjectionistDetect()
au FileType cpp setlocal foldmethod=syntax
augroup END
================================================
FILE: config/lang/crontab.vim
================================================
augroup luan_crontab
autocmd!
autocmd FileType crontab setlocal nobackup nowritebackup
augroup END
================================================
FILE: config/lang/elm.vim
================================================
" show types in autocomplete menu
let g:elm_detailed_complete = 1
let g:elm_format_autosave = 1
let g:elm_syntastic_show_warnings = 1
================================================
FILE: config/lang/golang.vim
================================================
" vim-go setup
let g:go_fmt_autosave = 0
let g:go_fmt_command = 'goimports'
let g:go_fmt_fail_silently = 1
" this breaks folding on vim < 8.0 or neovim
if v:version >= 800 || has('nvim')
let g:go_fmt_experimental = 1
endif
let g:go_highlight_build_constraints = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_operators = 1
let g:go_highlight_structs = 1
let g:go_highlight_types = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_snippet_engine = 'ultisnips'
let g:go_bin_path = resolve(expand('<sfile>:h') . '/../../gobin')
let $PATH .= ':' . g:go_bin_path
let s:go_tags_path = resolve(expand('<sfile>:h') . '/../../gotags')
let s:go_tags_script_path = resolve(expand('<sfile>:h') . '/../../scripts/gotags')
let s:go_tags_lock_path = resolve(expand('<sfile>:h') . '/../../tmp/gotagslock')
let g:go_auto_type_info = 0
let g:ale_go_golangci_lint_package = 1
let g:ale_go_golangci_lint_options = '--enable-all
\ --tests
\ --fast
\ --disable gochecknoglobals
\ --disable gochecknoinits'
function! golang#project_tags_path()
return s:go_tags_path . '/' . substitute(expand('%:p'), '/', '--', 'g') . '--tags'
endfunction
function! golang#global_tags_path()
return s:go_tags_path . '/' . substitute($GOPATH, '/', '--', 'g') . '--tags'
endfunction
function! golang#generate()
let l:tags_path = golang#project_tags_path()
let l:global_tags_path = golang#global_tags_path()
call vimproc#system_bg(
\ "bash -c 'LOCKDIR=\"" . s:go_tags_lock_path . '" '.
\ s:go_tags_script_path . ' ' . l:tags_path . ' ' . l:global_tags_path .
\ "'"
\ )
endfunction
function! golang#buffcommands()
command! -buffer -bar -nargs=0 GoTags call golang#generate()
setlocal foldmethod=syntax shiftwidth=2 tabstop=2 softtabstop=2 noexpandtab
let l:tags_path = golang#project_tags_path()
let l:global_tags_path = golang#global_tags_path()
exec 'setlocal tags=' . l:tags_path . ',' . l:global_tags_path . ',tags'
endfunction
let s:projections = {
\ '*.go': {'type': 'go', 'alternate': '{}_test.go'},
\ '*_test.go': {'type': 'go', 'alternate': '{}.go'},
\ }
function! s:ProjectionistDetect() abort
if &filetype ==# 'go'
let l:projections = deepcopy(s:projections)
call projectionist#append(getcwd(), l:projections)
endif
endfunction
augroup luan_golang
autocmd!
autocmd User ProjectionistDetect call s:ProjectionistDetect()
autocmd Filetype go command! -bang A call go#alternate#Switch(<bang>0, 'edit')
autocmd Filetype go command! -bang AV call go#alternate#Switch(<bang>0, 'vsplit')
autocmd Filetype go command! -bang AS call go#alternate#Switch(<bang>0, 'split')
autocmd FileType go compiler go
autocmd! BufEnter *.go call golang#buffcommands()
augroup END
augroup luan_go_gotags
autocmd!
autocmd BufWritePost *.go call golang#generate()
augroup END
================================================
FILE: config/lang/javascript.vim
================================================
let g:javascript_plugin_flow = 1
let g:used_javascript_libs = 'jquery,underscore,vue,jasmine,ramda,d3,react'
augroup luan_js
autocmd!
autocmd FileType javascript setlocal foldmethod=syntax expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd BufRead,BufNewFile .eslintrc setlocal filetype=json
augroup END
================================================
FILE: config/lang/markdown.vim
================================================
augroup luan_markdown
autocmd!
autocmd BufNewFile,BufRead *.md setlocal spell | setlocal lbr | setlocal nonu
augroup END
let g:markdown_fenced_languages = ['html', 'json', 'css', 'javascript', 'vim', 'go', 'ruby', 'python', 'bash=sh']
================================================
FILE: config/lang/ruby.vim
================================================
augroup luan_ruby
autocmd FileType ruby setlocal ts=2 sts=2 sw=2 norelativenumber nocursorline re=1 foldmethod=syntax
augroup END
================================================
FILE: config/lang/rust.vim
================================================
let g:rustfmt_autosave = 0
================================================
FILE: config/lang/vue.vim
================================================
augroup luan_vue
autocmd!
autocmd BufWritePost *.vue syntax sync fromstart
autocmd BufReadPost *.vue syntax sync fromstart
autocmd FileType vue syntax sync fromstart
augroup END
let g:vue_disable_pre_processors=1
================================================
FILE: config/lang/yaml.vim
================================================
" disable fucking stupid yaml indenting logic
augroup luan_yml
autocmd!
autocmd FileType yaml setlocal indentexpr=
autocmd FileType yaml setlocal norelativenumber nocursorline
augroup END
================================================
FILE: config/paste.vim
================================================
" I haven't found how to hide this function (yet)
function! RestoreRegister()
let @" = s:restore_reg
return ''
endfunction
function! s:Repl()
let s:restore_reg = @"
return "p@=RestoreRegister()\<cr>"
endfunction
" NB: this supports "rp that replaces the selection by the contents of @r
vnoremap <silent> <expr> p <sid>Repl()
================================================
FILE: config/plugin/ack.vim
================================================
if executable('rg')
let g:ackprg = 'rg --vimgrep'
elseif executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
cnoreabbrev Ag Ack
cnoreabbrev Rg Ack
nnoremap <Leader>a :Ack!<Space>
================================================
FILE: config/plugin/airline.vim
================================================
let g:airline_theme = 'tomorrow'
if !exists('g:airline_powerline_fonts')
if (has('gui_running') && &guifont =~# 'for Powerline')
let g:airline_powerline_fonts = 1
else
let g:airline_powerline_fonts = 0
endif
end
if !g:airline_powerline_fonts
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
endif
let g:airline_extensions = ['branch', 'netrw', 'ale', 'tabline']
================================================
FILE: config/plugin/ale.vim
================================================
scriptencoding utf-8
nmap <silent> <C-S-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-S-j> <Plug>(ale_next_wrap)
let g:ale_sign_error = '✘'
let g:ale_sign_warning = '➤'
let g:ale_sign_info = '➟'
let g:ale_sign_column_always = 1
let g:ale_linters = {
\ 'go': ['go build', 'gofmt', 'golangci-lint'],
\ 'typescript': ['tsserver', 'typecheck'],
\ 'javascript': ['eslint'],
\}
" Enable completion where available.
let g:ale_completion_enabled = 1
================================================
FILE: config/plugin/autoformat.vim
================================================
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
let g:formatters_javascript = ['eslint_local']
let g:formatters_vue = ['eslint_local']
augroup luan_autoformat
autocmd!
autocmd BufWrite *.c,*.h,*.cpp,*.hpp,*.go,*.js,*.vue,*.rs :Autoformat
augroup END
================================================
FILE: config/plugin/better-whitespace.vim
================================================
let g:better_whitespace_operator='_s'
================================================
FILE: config/plugin/ctrlp.vim
================================================
let g:ctrlp_match_window = 'bottom,order:ttb,min:1,max:10,results:50'
let g:ctrlp_clear_cache_on_exit = 1
let g:ctrlp_cache_dir='~/.vim/.cache/ctrlp'
let g:ctrlp_switch_buffer = '0'
let g:ctrlp_map = ''
nnoremap <C-p> :CtrlPCurWD<cr>
nnoremap <leader>f :CtrlPCurWD<cr>
nnoremap <leader>m :CtrlPMRUFiles<cr>
nnoremap <leader>F :CtrlPBufTag<cr>
nnoremap <leader>S :CtrlPTag<cr>
nnoremap <leader>L :CtrlPLine<cr>
nnoremap <leader>b :CtrlPBuffer<cr>
function! s:define_user_command()
let l:expr = '\.final_builds/*\|node_modules/*\|\.o$\|\.obj$\|\.exe$\|\.so$\'
let l:expr = l:expr . '|\.dll$\|\.pyc$\|\.svn\|\.hg\|\.bzr\|\.git\|\.sass-cache\'
let l:expr = l:expr . '|\.class\|\.scssc\|Godeps/*'
" Set the user_command option
if executable('ag')
let g:ctrlp_use_caching = 0
let l:cmd = 'ag %s -U -l --hidden --nocolor -g ""'
else
let l:cmd = 'find %s -type f'
endif
" Set the user_command option
let g:ctrlp_user_command = has('win32') || has('win64')
\ ? 'dir %s /-n /b /s /a-d | findstr /V /l "' . l:expr . '"'
\ : l:cmd . ' | grep -v "'. l:expr .'"'
endfunction
call s:define_user_command()
================================================
FILE: config/plugin/fugitive.vim
================================================
nnoremap <leader>gs :Gstatus<cr>
nnoremap <leader>gb :Gblame<cr>
nnoremap <leader>gg :Gbrowse<cr>
nnoremap <leader>gl :Glog<cr>
nnoremap <leader>gv :Gitv<cr>
nnoremap <leader>gpl :Git pull --rebase<cr>
nnoremap <leader>gps :Git push origin head<cr>
================================================
FILE: config/plugin/fzf.vim
================================================
function! s:buflist()
redir => l:ls
silent ls
redir END
return split(l:ls, '\n')
endfunction
function! s:bufopen(e)
execute 'buffer' matchstr(a:e, '^[ 0-9]*')
endfunction
let g:ctrlp_map = ''
let g:ctrlp_cmd = ''
if executable('rg')
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
elseif executable('ag')
let g:ackprg = 'ag --vimgrep'
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
endif
command! -bang -nargs=* FZFRg
\ call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '
\ . shellescape(<q-args>), 1, <bang>0
\ )
nnoremap <C-p> :FZFFiles<cr>
nnoremap <leader>f :FZFFiles<cr>
nnoremap <leader>m :FZFHistory<cr>
nnoremap <leader>F :FZFBTags<cr>
nnoremap <leader>S :FZFTags<cr>
nnoremap <leader>L :FZFLines<cr>
nnoremap <leader>b :FZFBuffers<cr>
nnoremap <leader>C :FZFColors<cr>
nnoremap <leader>G :FZFRg<space>
nnoremap <leader>: :FZFHistory:<cr>
nnoremap <leader>? :FZFHistory/<cr>
nnoremap <leader><c-j> :FZFSnippets<cr>
nnoremap <leader>d :FZFCommands<cr>
================================================
FILE: config/plugin/goyo.vim
================================================
function! s:goyo_enter()
silent !i3-msg fullscreen || true
silent !tmux set status off || true
silent !tmux list-panes -F \#F | grep -q Z || tmux resize-pane -Z || true
set noshowmode
set noshowcmd
set scrolloff=999
set nolazyredraw
execute 'SignifyDisable'
execute 'Limelight'
endfunction
function! s:goyo_leave()
silent !i3-msg fullscreen || true
silent !tmux set status on || true
silent !tmux list-panes -F \#F | grep -q Z && tmux resize-pane -Z || true
set showmode
set showcmd
set scrolloff=5
execute ':SignifyEnable'
execute ':Limelight!'
endfunction
let g:limelight_default_coefficient = 0.7
let g:limelight_paragraph_span = 1
augroup luan_goyo
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
autocmd VimResized * if exists('#goyo') | exe "normal \<c-w>=" | redraw! | endif
augroup END
nmap <leader>Z :Goyo<cr>
nmap <leader>X :Limelight!!<cr>
nmap <Leader>i <Plug>(Limelight)
xmap <Leader>i <Plug>(Limelight)
================================================
FILE: config/plugin/livedown.vim
================================================
nmap gm :LivedownToggle<CR>
================================================
FILE: config/plugin/multicursor.vim
================================================
" Called once right before you start selecting multiple cursors
function! Multiple_cursors_before()
if exists(':NeoCompleteLock')==2
exe 'NeoCompleteLock'
endif
endfunction
" Called once only when the multiple selection is canceled (default <Esc>)
function! Multiple_cursors_after()
if exists(':NeoCompleteUnlock')==2
exe 'NeoCompleteUnlock'
endif
endfunction
================================================
FILE: config/plugin/ncm.vim
================================================
if !has('python3')
augroup luan_ncm
autocmd!
autocmd VimEnter *
\ echohl Error | echomsg '[vimfiles] cannot setup autocomplete, install vim with python3 or try neovim' | echohl None
finish
augroup END
endif
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
================================================
FILE: config/plugin/nerdtree.vim
================================================
" ---------------
" NERDTree
" ---------------
nnoremap <leader>nn :NERDTreeToggle<CR>
nnoremap \ :NERDTreeToggle<CR>
nnoremap <leader>nf :NERDTreeFind<CR>
nnoremap \| :NERDTreeFind<CR>
let g:NERDTreeShowBookmarks=1
let g:NERDTreeChDirMode=2 " Change the NERDTree directory to the root node
let g:NERDTreeHijackNetrw=0
augroup luan_nerdtree
autocmd!
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
augroup END
================================================
FILE: config/plugin/signify.vim
================================================
let g:signify_update_on_bufenter = 1
let g:signify_disable_by_default = 0
================================================
FILE: config/plugin/tagbar.vim
================================================
let g:tagbar_type_css = {
\ 'ctagstype' : 'Css',
\ 'kinds' : [
\ 'c:classes',
\ 's:selectors',
\ 'i:identities'
\ ]
\ }
let g:tagbar_type_ruby = {
\ 'kinds' : [
\ 'm:modules',
\ 'c:classes',
\ 'd:describes',
\ 'C:contexts',
\ 'f:methods',
\ 'F:singleton methods'
\ ]
\ }
nmap <F8> :TagbarToggle<CR>
================================================
FILE: config/plugin/tcomment.vim
================================================
nmap <leader>ci :TComment<cr>
xmap <leader>ci :TComment<cr>
nmap <leader>/ :TComment<cr>
xmap <leader>/ :TComment<cr>
================================================
FILE: config/plugin/ultisnips.vim
================================================
let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsJumpForwardTrigger='<c-f>'
let g:UltiSnipsJumpBackwardTrigger='<c-b>'
let g:UltiSnipsSnippetDir=$HOME.'/.vim/UltiSnips'
================================================
FILE: config/plugin/undotree.vim
================================================
nnoremap <leader>u :UndotreeToggle<cr>
================================================
FILE: gvimrc
================================================
" Unbind these keys for different bindings in vimrc
if has('gui_macvim')
" D-p
macmenu &File.Print key=<nop>
" D-p
macmenu Edit.Find.Find\.\.\. key=<nop>
" D-b
macmenu &Tools.Make key=<nop>
" D-l
macmenu &Tools.List\ Errors key=<nop>
endif
================================================
FILE: index.html
================================================
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Vimfiles by luan</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">Vimfiles</h1>
<h2 class="project-tagline">The Vim Configuration. Uses vim-plug to manage plugins.</h2>
<a href="https://github.com/luan/vimfiles" class="btn">View on GitHub</a>
<a href="https://github.com/luan/vimfiles/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/luan/vimfiles/tarball/master" class="btn">Download .tar.gz</a>
</section>
<section class="main-content">
<h1>
<a id="the-vim-configuration-" class="anchor" href="#the-vim-configuration-" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>The Vim Configuration. <a href="https://travis-ci.org/luan/vimfiles"><img src="https://travis-ci.org/luan/vimfiles.svg?branch=master" alt="Build Status"></a>
</h1>
<p>If you're trying to use this config checkout this <a href="https://github.com/luan/vimfiles/wiki/Luan's-Vim-Cheat-Sheet">cheat
sheet</a>.</p>
<hr>
<p>This vimfiles support both standard <a href="http://www.vim.org/">vim</a> and
<a href="https://neovim.io/">neovim</a>, I'd encourage you to give neovim a try.</p>
<p>If you're using neovim follow <a href="https://github.com/neovim/neovim/wiki/Installing-Neovim">this
guide</a> in order to get
it properly setup. The autocompletion plugin we use needs <a href="https://neovim.io/doc/user/nvim_python.html">python3
support</a> too.</p>
<p>If you're using regular vim make sure to install it with lua support, on ubuntu
that's provided with the <code>vim-nox</code> package and on OSX it can be installed with
Homebrew by doing <code>brew install vim --with-lua</code>.</p>
<h3>
<a id="table-of-contents" class="anchor" href="#table-of-contents" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Table of Contents</h3>
<ol>
<li><a href="#using-this-configuration">Using This Configuration</a></li>
<li>
<a href="#installation">Installation</a>
<ol>
<li>
<a href="#additional-dependencies">Additional Dependencies</a>
<ol>
<li><a href="#ctags">ctags</a></li>
</ol>
</li>
</ol>
</li>
<li><a href="#updating">Updating</a></li>
<li>
<a href="#customizing">Customizing</a>
<ol>
<li><a href="#changing-configuration">Changing Configuration</a></li>
<li><a href="#adding-plugins">Adding Plugins</a></li>
</ol>
</li>
<li>
<a href="#functionality">Functionality</a>
<ol>
<li><a href="#defaults-overridden">Defaults Overridden</a></li>
</ol>
</li>
<li><a href="#screenshots">Screenshots</a></li>
</ol>
<h2>
<a id="using-this-configuration" class="anchor" href="#using-this-configuration" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Using This Configuration</h2>
<p>This configuration is supposed to be used directly, <strong>not</strong> forked. If you intend
to keep up to date with changes made to this repo it's recommended that you
just clone this repository and customize the config using the <a href="#customizing">provided
hooks</a>. If you have a feature or fix to submit, feel free to fork
and send a PR.</p>
<hr>
<h2>
<a id="installation" class="anchor" href="#installation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Installation</h2>
<p>As simple as:</p>
<div class="highlight highlight-source-shell"><pre>curl vimfiles.luan.sh/install <span class="pl-k">|</span> bash
<span class="pl-c"># To override you current config:</span>
<span class="pl-c"># curl vimfiles.luan.sh/install | FORCE=1 bash</span></pre></div>
<h3>
<a id="additional-dependencies" class="anchor" href="#additional-dependencies" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Additional Dependencies</h3>
<p>Most of the dependencies are installed automatically, assuming you have a
minimal development environment for you language. For example we download all
the tools for golang and elm automatically. <code>git</code> is assumed to be installed
and so is <code>ag</code> or <code>ack</code>, if either of those is not, some plugins may not behave
as expected.</p>
<h4>
<a id="ctags" class="anchor" href="#ctags" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>ctags</h4>
<p><code>ctags</code> is used to jump to function definitions, it is not strictly necessary if
you don't need that functionality, if you want to be able to jump effectively
to definitions install the correct version of ctags.</p>
<p><strong>OSX</strong></p>
<div class="highlight highlight-source-shell"><pre>brew uninstall ctags
brew tap universal-ctags/universal-ctags
brew install universal-ctags --HEAD</pre></div>
<p><strong>Linux</strong></p>
<p><em>exuberant-ctags</em> from your OS is generally enough for most things, but if you
want more CSS, ruby and other goodnesses you will need to manually compile and
replace your ctags installation with: <a href="https://github.com/fishman/ctags">https://github.com/fishman/ctags</a></p>
<hr>
<h2>
<a id="updating" class="anchor" href="#updating" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Updating</h2>
<p>You should frequently update you copy of this config, to get latest fixes and
improvements. To do so you can run:</p>
<div class="highlight highlight-source-shell"><pre>vim-update</pre></div>
<p>Assuming <code>/usr/local/bin</code> is on your <code>PATH</code> on OSX or <code>~/bin/</code> on Linux.</p>
<p>If that doesn't work you can always run the script directly:</p>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">~</span>/.vim/update</pre></div>
<hr>
<h2>
<a id="customizing" class="anchor" href="#customizing" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Customizing</h2>
<p>We load 3 extra configuration files that are <strong>NOT</strong> part of this repo:</p>
<ul>
<li>
<code>~/.vimrc.local.before</code> (<em>to open: <code>,vb</code></em>): Configuration to be set before everything else, this
runs before any plugin or any config from this repository.</li>
<li>
<code>~/.vimrc.local</code> (<em>to open: <code>,vl</code></em>): Configuration to be set after everything else, this runs
after all other configuration is loaded and all plugins are setup.</li>
<li>
<code>~/.vimrc.local.plugins</code> (<em>to open: <code>,vp</code></em>): Extra plugins to be loaded (along with maybe
optional configuration for them). Is loaded after all the default plugins are
installed.</li>
</ul>
<p>A common pattern is for individuals or teams to have those 3 files checked in
to a separate <a href="https://github.com/luan/dotfiles">dotfiles</a> repository and have
them be symlinked into your <code>$HOME</code> directory. Symlink them before you run the
install script and everything should work.</p>
<h3>
<a id="changing-configuration" class="anchor" href="#changing-configuration" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Changing Configuration</h3>
<p>You might want to change some config such as disabling autocompletion or
enabling auto save, or maybe just changing your colorscheme. You can do so by
editing the <code>~/.vimrc.local</code> file, for example:</p>
<p>Changing colorscheme:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-c1">colorscheme</span> gruvbox</pre></div>
<p>Enabling auto save:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-c">" will save automatically when leaving the buffer</span>
<span class="pl-c">" 0 or 1, defaults 0</span>
<span class="pl-k">let</span> <span class="pl-smi"><span class="pl-k">g:</span>autosave</span> <span class="pl-k">=</span> <span class="pl-c1">1</span></pre></div>
<p>Disabling neocomplete:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-k">let</span> <span class="pl-smi"><span class="pl-k">g:</span>neocomplete</span><span class="pl-c1">#e</span>nable_at_startup <span class="pl-k">=</span> <span class="pl-c1">0</span><span class="pl-c"> " disable neocomplete</span>
<span class="pl-k">let</span> <span class="pl-smi"><span class="pl-k">g:</span>neocomplcache_enable_at_startup</span> <span class="pl-k">=</span> <span class="pl-c1">0</span><span class="pl-c"> " disable the fallback version when no LUA</span></pre></div>
<p>Some configuration values need to be set before loading plugins, for that we
have the <code>~/.vimrc.local.before</code>, that get's loaded before everything else, one
example usage of it is enabling fancy characters for the airline plugin:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-k">let</span> <span class="pl-smi"><span class="pl-k">g:</span>airline_powerline_fonts</span> <span class="pl-k">=</span> <span class="pl-c1">1</span></pre></div>
<h3>
<a id="adding-plugins" class="anchor" href="#adding-plugins" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Adding Plugins</h3>
<p>If you have a favorite plugin you want to install but couldn't convince me to
add it as a default you can still have it be installed by just putting it in
the <code>~/.vimrc.local.plugins</code>, like such:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-c">" Plugin to navigate between camelCase words</span>
Plug <span class="pl-s"><span class="pl-pds">'</span>bkad/CamelCaseMotion<span class="pl-pds">'</span></span></pre></div>
<hr>
<h2>
<a id="functionality" class="anchor" href="#functionality" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Functionality</h2>
<p>This config packs a considerable amount of plugins, there are descriptions for
most of them <a href="Plug.vim">here</a> in the comments. It also strives to not override
default behavior, although that's not always possible.</p>
<p>There's <a href="https://github.com/luan/vimfiles/issues/56">space to write some
guides</a> as to how to effectively
use this config for certain languages. The main targets are golang and ruby,
although this configuration should be usable with most languages.</p>
<h3>
<a id="defaults-overridden" class="anchor" href="#defaults-overridden" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Defaults Overridden</h3>
<p>These bindings are known to be overridden in this config. Please open an
<a href="https://github.com/luan/vimfiles/issues/new">issue</a> if you find any other.</p>
<ul>
<li>
<code>|</code>: Default behavior is jump to column. We have it set to <code>:NERDTreeFocus</code>.</li>
<li>
<code>,</code>: Default is reverse repeat a <code>f</code>, <code>t</code>, <code>F</code>, or <code>T</code> search. We have it set to <code><leader></code>.</li>
<li>
<code>\</code>: Is the default <code><leader></code>. We have it set to <code>:NERDTreeToggle</code>.</li>
<li>
<code><enter></code> or <code><cr></code>: Default behavior is to move the cursor one line down. We
have it set to save if modified (basically <code>:w</code> when the file has a change).</li>
</ul>
<p>A lot of small defaults are overridden everywhere else, and those are just to
make editing a better experience and should in no way make this vim not feel
like vim. For a glance in some of the changes look at
<a href="config/basic.vim">config/basic.vim</a>.</p>
<p>A few overridden are worth mentioning:</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-c1">set</span> <span class="pl-c1">splitright</span></pre></div>
<p>These change where new splits are open, when you for example do <code>:vs</code> the
default behavior is to open a split on the left, it feels more natural to open
one on the right instead.</p>
<div class="highlight highlight-source-viml"><pre><span class="pl-c1">set</span> <span class="pl-c1">iskeyword</span><span class="pl-k">+</span><span class="pl-k">=</span><span class="pl-smi">$</span>,<span class="pl-smi">@</span>,<span class="pl-k">-</span></pre></div>
<p>Add extra characters that are valid parts of variables.</p>
<hr>
<h2>
<a id="screenshots" class="anchor" href="#screenshots" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Screenshots</h2>
<p><strong>Default colorscheme: hybrid</strong></p>
<p><a href="https://github.com/luan/vimfiles/raw/master/screenshots/hybrid.png"><img src="https://github.com/luan/vimfiles/raw/master/screenshots/hybrid.png" alt="hybrid"></a></p>
<p><strong>Alternate colorscheme: monokai</strong></p>
<p><a href="https://github.com/luan/vimfiles/raw/master/screenshots/monokai.png"><img src="https://github.com/luan/vimfiles/raw/master/screenshots/monokai.png" alt="monokai"></a></p>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/luan/vimfiles">Vimfiles</a> is maintained by <a href="https://github.com/luan">luan</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
</body>
</html>
================================================
FILE: lib/autocommands.vim
================================================
" ----------------------------------------
" Auto Commands
" ----------------------------------------
augroup luan_general
autocmd!
" No formatting on o key newlines
autocmd BufNewFile,BufEnter * set formatoptions-=o
" Fix trailing whitespace in my most used programming langauges
autocmd FileType vim set fdm=marker foldmarker={{{,}}}
if exists('g:autosave') && g:autosave == 1
autocmd FocusLost * silent! wa
endif
au FileType qf nnoremap <buffer> <Enter> <Enter>
" quickfix list takes full width & wraps lines
autocmd FileType qf wincmd J
autocmd FileType qf setlocal wrap
augroup END
augroup luan_vimrcEx
" Clear all autocmds in the group
autocmd!
" Jump to last cursor position unless it's invalid or in an event handler
autocmd BufReadPost *
\ if &filetype != "gitcommit" && line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
augroup END
================================================
FILE: lib/functions.vim
================================================
" ----------------------------------------
" Functions
" ----------------------------------------
" ---------------
" Convert Ruby 1.8 hash rockets to 1.9 JSON style hashes.
" From: http://git.io/cxmJDw
" Note: Defaults to the entire file unless in visual mode.
" ---------------
command! -bar -range=% NotRocket execute '<line1>,<line2>s/:\(\w\+\)\s*=>/\1:/e' . (&gdefault ? '' : 'g')
" ---------------
" Strip Trailing White Space
" ---------------
" From http://vimbits.com/bits/377
" Preserves/Saves the state, executes a command, and returns to the saved state
function! Preserve(command)
" Preparation: save last search, and cursor position.
let l:_s = getreg('/')
let l:l = line('.')
let l:c = col('.')
" Do the business:
execute a:command
" Clean up: restore previous search history, and cursor position
call setreg('/', l:_s)
call cursor(l:l, l:c)
endfunction
"strip all trailing white space
command! StripTrailingWhiteSpace :call Preserve("%s/\\s\\+$//e")<CR>
" ---------------
" Quick spelling fix (first item in z= list)
" ---------------
function! QuickSpellingFix()
if &spell
normal! 1z=
else
" Enable spelling mode and do the correction
set spell
normal! 1z=
set nospell
endif
endfunction
command! QuickSpellingFix call QuickSpellingFix()
" ---------------
" Convert Ruby 1.8 hash rockets to 1.9 JSON style hashes.
" From: http://git.io/cxmJDw
" Note: Defaults to the entire file unless in visual mode.
" ---------------
command! -bar -range=% NotRocket execute '<line1>,<line2>s/:\(\w\+\)\s*=>/\1:/e' . (&gdefault ? '' : 'g')
" ---------------
" Tests
" ---------------
function! RunTestFile(...)
if a:0
let l:command_suffix = a:1
else
let l:command_suffix = ''
endif
" Run the tests for the previously-marked file.
let l:in_test_file = match(expand('%'), '\(.feature\|_spec.rb\|_test.go\|_test.js\|_spec.js\|.bats\|.test.js\|.spec.js\)$') != -1
if l:in_test_file
call RunTests(expand('%') . l:command_suffix)
else
call RunTests('')
end
endfunction
function! RunNearestTest()
let l:spec_line_number = line('.')
let s:last_command = ':' . l:spec_line_number
call RunTestFile(':' . l:spec_line_number)
endfunction
function! RunTests(filename)
:wa
if a:filename ==# ''
call vipe#peek()
return
endif
let l:command = ''
if match(a:filename, '\.feature') != -1
if filereadable('script/features')
let l:command = 'script/features ' . a:filename
elseif filereadable('Gemfile')
let l:command = 'bundle exec cucumber ' . a:filename
else
let l:command = 'cucumber ' . a:filename
end
elseif match(a:filename, '_test\.go') != -1
if filereadable('script/test')
let l:command = 'script/test ' . fnamemodify(a:filename, ':h')
elseif filereadable('scripts/test')
let l:command = 'scripts/test ' . fnamemodify(a:filename, ':h')
elseif filereadable('scripts/test-unit')
let l:command = 'scripts/test-unit ' . fnamemodify(a:filename, ':h')
else
let l:command = 'ginkgo ' . fnamemodify(a:filename, ':h')
end
elseif match(a:filename, '_spec\.js') != -1
if filereadable('package.json')
let l:command = 'npm test ' . a:filename
else
let l:command = 'jasmine ' . a:filename
end
elseif match(a:filename, '\.bats') != -1
let l:command = 'bats ' . a:filename
else
if filereadable('script/test')
let l:command = 'script/test ' . a:filename
elseif filereadable('scripts/test')
let l:command = 'scripts/test ' . a:filename
elseif (exists('g:force_bundle_exec') && g:force_bundle_exec == 1) || filereadable('Gemfile')
let l:command = 'bundle exec rspec --color ' . a:filename
else
let l:command = 'rspec --color ' . a:filename
end
end
call vipe#push(l:command)
endfunction
================================================
FILE: lib/watchforchanges.vim
================================================
" If you are using a console version of Vim, or dealing
" with a file that changes externally (e.g. a web server log)
" then Vim does not always check to see if the file has been changed.
" The GUI version of Vim will check more often (for example on Focus change),
" and prompt you if you want to reload the file.
"
" There can be cases where you can be working away, and Vim does not
" realize the file has changed. This command will force Vim to check
" more often.
"
" Calling this command sets up autocommands that check to see if the
" current buffer has been modified outside of vim (using checktime)
" and, if it has, reload it for you.
"
" This check is done whenever any of the following events are triggered:
" * BufEnter
" * CursorMoved
" * CursorMovedI
" * CursorHold
" * CursorHoldI
"
" In other words, this check occurs whenever you enter a buffer, move the cursor,
" or just wait without doing anything for 'updatetime' milliseconds.
"
" Normally it will ask you if you want to load the file, even if you haven't made
" any changes in vim. This can get annoying, however, if you frequently need to reload
" the file, so if you would rather have it to reload the buffer *without*
" prompting you, add a bang (!) after the command (WatchForChanges!).
" This will set the autoread option for that buffer in addition to setting up the
" autocommands.
"
" If you want to turn *off* watching for the buffer, just call the command again while
" in the same buffer. Each time you call the command it will toggle between on and off.
"
" WatchForChanges sets autocommands that are triggered while in *any* buffer.
" If you want vim to only check for changes to that buffer while editing the buffer
" that is being watched, use WatchForChangesWhileInThisBuffer instead.
"
command! -bang WatchForChanges :call WatchForChanges(@%, {'toggle': 1, 'autoread': <bang>0})
command! -bang WatchForChangesWhileInThisBuffer :call WatchForChanges(@%, {'toggle': 1, 'autoread': <bang>0, 'while_in_this_buffer_only': 1})
command! -bang WatchForChangesAllFile :call WatchForChanges('*', {'toggle': 1, 'autoread': <bang>0})
" WatchForChanges function
"
" This is used by the WatchForChanges* commands, but it can also be
" useful to call this from scripts. For example, if your script executes a
" long-running process, you can have your script run that long-running process
" in the background so that you can continue editing other files, redirects its
" output to a file, and open the file in another buffer that keeps reloading itself
" as more output from the long-running command becomes available.
"
" Arguments:
" * bufname: The name of the buffer/file to watch for changes.
" Use '*' to watch all files.
" * options (optional): A Dict object with any of the following keys:
" * autoread: If set to 1, causes autoread option to be turned on for the buffer in
" addition to setting up the autocommands.
" * toggle: If set to 1, causes this behavior to toggle between on and off.
" Mostly useful for mappings and commands. In scripts, you probably want to
" explicitly enable or disable it.
" * disable: If set to 1, turns off this behavior (removes the autocommand group).
" * while_in_this_buffer_only: If set to 0 (default), the events will be triggered no matter which
" buffer you are editing. (Only the specified buffer will be checked for changes,
" though, still.) If set to 1, the events will only be triggered while
" editing the specified buffer.
" * more_events: If set to 1 (the default), creates autocommands for the events
" listed above. Set to 0 to not create autocommands for CursorMoved, CursorMovedI,
" (Presumably, having too much going on for those events could slow things down,
" since they are triggered so frequently...)
function! WatchForChanges(bufname, ...)
" Figure out which options are in effect
if a:bufname ==# '*'
let l:id = 'WatchForChanges'.'AnyBuffer'
" If you try to do checktime *, you'll get E93: More than one match for * is given
let l:bufspec = ''
else
if bufnr(a:bufname) == -1
echoerr 'Buffer ' . a:bufname . " doesn't exist"
return
end
let l:id = 'WatchForChanges'.bufnr(a:bufname)
let l:bufspec = a:bufname
end
if len(a:000) == 0
let l:options = {}
else
if type(a:1) == type({})
let l:options = a:1
else
echoerr 'Argument must be a Dict'
end
end
let l:autoread = has_key(l:options, 'autoread') ? l:options['autoread'] : 0
let l:toggle = has_key(l:options, 'toggle') ? l:options['toggle'] : 0
let l:disable = has_key(l:options, 'disable') ? l:options['disable'] : 0
let l:more_events = has_key(l:options, 'more_events') ? l:options['more_events'] : 0
let l:while_in_this_buffer_only = has_key(l:options, 'while_in_this_buffer_only') ? l:options['while_in_this_buffer_only'] : 0
if l:while_in_this_buffer_only
let l:event_bufspec = a:bufname
else
let l:event_bufspec = '*'
end
let l:reg_saved = @"
"let autoread_saved = &autoread
" Check to see if the autocommand already exists
redir @"
silent! exec 'au '.l:id
redir END
let l:defined = (@" !~# 'E216: No such group or event:')
" If not yet defined...
if !l:defined
if l:autoread
if a:bufname ==# '*'
set autoread
else
setlocal autoread
end
end
silent! exec 'augroup '.l:id
if a:bufname !=# '*'
exec 'au BufDelete '.a:bufname . " execute 'au! ".l:id."' | execute 'augroup! ".l:id."'"
end
exec 'au BufEnter '.l:event_bufspec . ' :checktime '.l:bufspec
exec 'au CursorHold '.l:event_bufspec . ' :checktime '.l:bufspec
exec 'au CursorHoldI '.l:event_bufspec . ' :checktime '.l:bufspec
" The following events might slow things down so we provide a way to disable them...
" vim docs warn:
" Careful: Don't do anything that the user does
" not expect or that is slow.
if l:more_events
exec 'au CursorMoved '.l:event_bufspec . ' :checktime '.l:bufspec
exec 'au CursorMovedI '.l:event_bufspec . ' :checktime '.l:bufspec
end
augroup END
end
" If they want to disable it, or it is defined and they want to toggle it,
if l:disable || (l:toggle && l:defined)
if l:autoread
if a:bufname ==# '*'
set noautoread
else
setlocal noautoread
end
end
" Using an autogroup allows us to remove it easily with the following
" command. If we do not use an autogroup, we cannot remove this
" single :checktime command
" augroup! checkforupdates
silent! exec 'au! '.l:id
silent! exec 'augroup! '.l:id
end
let @"=l:reg_saved
endfunction
let s:autoreadargs={'autoread':1}
execute WatchForChanges('*',s:autoreadargs)
================================================
FILE: params.json
================================================
{
"name": "Vimfiles",
"tagline": "The Vim Configuration. Uses vim-plug to manage plugins.",
"body": "# The Vim Configuration. [](https://travis-ci.org/luan/vimfiles)\r\n\r\nIf you're trying to use this config checkout this [cheat\r\nsheet](https://github.com/luan/vimfiles/wiki/Luan's-Vim-Cheat-Sheet).\r\n\r\n---\r\n\r\nThis vimfiles support both standard [vim](http://www.vim.org/) and\r\n[neovim](https://neovim.io/), I'd encourage you to give neovim a try.\r\n\r\nIf you're using neovim follow [this\r\nguide](https://github.com/neovim/neovim/wiki/Installing-Neovim) in order to get\r\nit properly setup. The autocompletion plugin we use needs [python3\r\nsupport](https://neovim.io/doc/user/nvim_python.html) too.\r\n\r\nIf you're using regular vim make sure to install it with lua support, on ubuntu\r\nthat's provided with the `vim-nox` package and on OSX it can be installed with\r\nHomebrew by doing `brew install vim --with-lua`.\r\n\r\n### Table of Contents\r\n\r\n1. [Using This Configuration](#using-this-configuration)\r\n1. [Installation](#installation)\r\n 1. [Additional Dependencies](#additional-dependencies)\r\n 1. [ctags](#ctags)\r\n1. [Updating](#updating)\r\n1. [Customizing](#customizing)\r\n 1. [Changing Configuration](#changing-configuration)\r\n 1. [Adding Plugins](#adding-plugins)\r\n1. [Functionality](#functionality)\r\n 1. [Defaults Overridden](#defaults-overridden)\r\n1. [Screenshots](#screenshots)\r\n\r\n## Using This Configuration\r\n\r\nThis configuration is supposed to be used directly, **not** forked. If you intend\r\nto keep up to date with changes made to this repo it's recommended that you\r\njust clone this repository and customize the config using the [provided\r\nhooks](#customizing). If you have a feature or fix to submit, feel free to fork\r\nand send a PR.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nAs simple as:\r\n```bash\r\ncurl vimfiles.luan.sh/install | bash\r\n\r\n# To override you current config:\r\n# curl vimfiles.luan.sh/install | FORCE=1 bash\r\n```\r\n\r\n### Additional Dependencies\r\n\r\nMost of the dependencies are installed automatically, assuming you have a\r\nminimal development environment for you language. For example we download all\r\nthe tools for golang and elm automatically. `git` is assumed to be installed\r\nand so is `ag` or `ack`, if either of those is not, some plugins may not behave\r\nas expected.\r\n\r\n#### ctags\r\n\r\n`ctags` is used to jump to function definitions, it is not strictly necessary if\r\nyou don't need that functionality, if you want to be able to jump effectively\r\nto definitions install the correct version of ctags.\r\n\r\n**OSX**\r\n\r\n```bash\r\nbrew uninstall ctags\r\nbrew tap universal-ctags/universal-ctags\r\nbrew install universal-ctags --HEAD\r\n```\r\n\r\n**Linux**\r\n\r\n*exuberant-ctags* from your OS is generally enough for most things, but if you\r\nwant more CSS, ruby and other goodnesses you will need to manually compile and\r\nreplace your ctags installation with: https://github.com/fishman/ctags\r\n\r\n\r\n---\r\n\r\n## Updating\r\n\r\nYou should frequently update you copy of this config, to get latest fixes and\r\nimprovements. To do so you can run:\r\n```bash\r\nvim-update\r\n```\r\n\r\nAssuming `/usr/local/bin` is on your `PATH` on OSX or `~/bin/` on Linux.\r\n\r\nIf that doesn't work you can always run the script directly:\r\n```bash\r\n~/.vim/update\r\n```\r\n\r\n---\r\n\r\n## Customizing\r\n\r\nWe load 3 extra configuration files that are **NOT** part of this repo:\r\n\r\n* `~/.vimrc.local.before` (*to open: `,vb`*): Configuration to be set before everything else, this\r\n runs before any plugin or any config from this repository.\r\n* `~/.vimrc.local` (*to open: `,vl`*): Configuration to be set after everything else, this runs\r\n after all other configuration is loaded and all plugins are setup.\r\n* `~/.vimrc.local.plugins` (*to open: `,vp`*): Extra plugins to be loaded (along with maybe\r\n optional configuration for them). Is loaded after all the default plugins are\r\n installed.\r\n\r\nA common pattern is for individuals or teams to have those 3 files checked in\r\nto a separate [dotfiles](https://github.com/luan/dotfiles) repository and have\r\nthem be symlinked into your `$HOME` directory. Symlink them before you run the\r\ninstall script and everything should work.\r\n\r\n### Changing Configuration\r\n\r\nYou might want to change some config such as disabling autocompletion or\r\nenabling auto save, or maybe just changing your colorscheme. You can do so by\r\nediting the `~/.vimrc.local` file, for example:\r\n\r\nChanging colorscheme:\r\n```vim\r\ncolorscheme gruvbox\r\n```\r\n\r\nEnabling auto save:\r\n```vim\r\n\" will save automatically when leaving the buffer\r\n\" 0 or 1, defaults 0\r\nlet g:autosave = 1\r\n```\r\n\r\nDisabling neocomplete:\r\n```vim\r\nlet g:neocomplete#enable_at_startup = 0 \" disable neocomplete\r\nlet g:neocomplcache_enable_at_startup = 0 \" disable the fallback version when no LUA\r\n```\r\n\r\nSome configuration values need to be set before loading plugins, for that we\r\nhave the `~/.vimrc.local.before`, that get's loaded before everything else, one\r\nexample usage of it is enabling fancy characters for the airline plugin:\r\n```vim\r\nlet g:airline_powerline_fonts = 1\r\n```\r\n\r\n### Adding Plugins\r\n\r\nIf you have a favorite plugin you want to install but couldn't convince me to\r\nadd it as a default you can still have it be installed by just putting it in\r\nthe `~/.vimrc.local.plugins`, like such:\r\n```vim\r\n\" Plugin to navigate between camelCase words\r\nPlug 'bkad/CamelCaseMotion'\r\n```\r\n\r\n---\r\n\r\n## Functionality\r\n\r\nThis config packs a considerable amount of plugins, there are descriptions for\r\nmost of them [here](Plug.vim) in the comments. It also strives to not override\r\ndefault behavior, although that's not always possible.\r\n\r\nThere's [space to write some\r\nguides](https://github.com/luan/vimfiles/issues/56) as to how to effectively\r\nuse this config for certain languages. The main targets are golang and ruby,\r\nalthough this configuration should be usable with most languages.\r\n\r\n### Defaults Overridden\r\n\r\nThese bindings are known to be overridden in this config. Please open an\r\n[issue](https://github.com/luan/vimfiles/issues/new) if you find any other.\r\n* `|`: Default behavior is jump to column. We have it set to `:NERDTreeFocus`.\r\n* `,`: Default is reverse repeat a `f`, `t`, `F`, or `T` search. We have it set to `<leader>`.\r\n* `\\`: Is the default `<leader>`. We have it set to `:NERDTreeToggle`.\r\n* `<enter>` or `<cr>`: Default behavior is to move the cursor one line down. We\r\n have it set to save if modified (basically `:w` when the file has a change).\r\n\r\nA lot of small defaults are overridden everywhere else, and those are just to\r\nmake editing a better experience and should in no way make this vim not feel\r\nlike vim. For a glance in some of the changes look at\r\n[config/basic.vim](config/basic.vim).\r\n\r\nA few overridden are worth mentioning:\r\n\r\n```vim\r\nset splitright\r\n```\r\nThese change where new splits are open, when you for example do `:vs` the\r\ndefault behavior is to open a split on the left, it feels more natural to open\r\none on the right instead.\r\n\r\n```vim\r\nset iskeyword+=$,@,-\r\n```\r\nAdd extra characters that are valid parts of variables.\r\n\r\n---\r\n\r\n## Screenshots\r\n\r\n**Default colorscheme: hybrid**\r\n\r\n[](https://github.com/luan/vimfiles/raw/master/screenshots/hybrid.png)\r\n\r\n**Alternate colorscheme: monokai**\r\n\r\n[](https://github.com/luan/vimfiles/raw/master/screenshots/monokai.png)\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}
================================================
FILE: scripts/gotags
================================================
#!/bin/bash
if mkdir "$LOCKDIR"
then
gotags -silent -L <(find . -iname '*.go') > "$1"
gotags -silent -L <(find "$(go env GOROOT GOPATH)" -iname '*.go') > "$2"
rmdir "$LOCKDIR"
fi
================================================
FILE: scripts/test
================================================
#!/bin/bash
set -xeu
echo "PATH: $PATH"
echo "Using vim: $(which vim)"
vim --version
find config lib -name '*.vim' -print0 | xargs -0 vint -c vimrc
ln -s "$PWD" "$HOME/.vim"
mkdir -p "$HOME/bin"
if [ "$ENV" == "vim8" ]; then
./bin/install
elif [ "$ENV" == "neovim" ]; then
./bin/install --non-interactive
fi
================================================
FILE: stylesheets/github-light.css
================================================
/*
The MIT License (MIT)
Copyright (c) 2016 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
.pl-c /* comment */ {
color: #969896;
}
.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-s .pl-v /* string variable */ {
color: #0086b3;
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: #795da3;
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: #333;
}
.pl-ent /* entity.name.tag */ {
color: #63a35c;
}
.pl-k /* keyword, storage, storage.type */ {
color: #a71d5d;
}
.pl-s /* string */,
.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
.pl-sr /* string.regexp */,
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: #183691;
}
.pl-v /* variable */ {
color: #ed6a43;
}
.pl-id /* invalid.deprecated */ {
color: #b52a1d;
}
.pl-ii /* invalid.illegal */ {
color: #f8f8f8;
background-color: #b52a1d;
}
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: #63a35c;
}
.pl-ml /* markup.list */ {
color: #693a17;
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: #1d3e81;
}
.pl-mq /* markup.quote */ {
color: #008080;
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: #333;
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: #333;
}
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
color: #bd2c00;
background-color: #ffecec;
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
color: #55a532;
background-color: #eaffea;
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: #795da3;
}
.pl-mo /* meta.output */ {
color: #1d3e81;
}
================================================
FILE: stylesheets/normalize.css
================================================
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */ /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
================================================
FILE: stylesheets/stylesheet.css
================================================
* {
box-sizing: border-box; }
body {
padding: 0;
margin: 0;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #606c71; }
a {
color: #1e6bb8;
text-decoration: none; }
a:hover {
text-decoration: underline; }
.btn {
display: inline-block;
margin-bottom: 1rem;
color: rgba(255, 255, 255, 0.7);
background-color: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.2);
border-style: solid;
border-width: 1px;
border-radius: 0.3rem;
transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.btn + .btn {
margin-left: 1rem; }
.btn:hover {
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
background-color: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.3); }
@media screen and (min-width: 64em) {
.btn {
padding: 0.75rem 1rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.btn {
padding: 0.6rem 0.9rem;
font-size: 0.9rem; } }
@media screen and (max-width: 42em) {
.btn {
display: block;
width: 100%;
padding: 0.75rem;
font-size: 0.9rem; }
.btn + .btn {
margin-top: 1rem;
margin-left: 0; } }
.page-header {
color: #fff;
text-align: center;
background-color: #159957;
background-image: linear-gradient(120deg, #155799, #159957); }
@media screen and (min-width: 64em) {
.page-header {
padding: 5rem 6rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.page-header {
padding: 3rem 4rem; } }
@media screen and (max-width: 42em) {
.page-header {
padding: 2rem 1rem; } }
.project-name {
margin-top: 0;
margin-bottom: 0.1rem; }
@media screen and (min-width: 64em) {
.project-name {
font-size: 3.25rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.project-name {
font-size: 2.25rem; } }
@media screen and (max-width: 42em) {
.project-name {
font-size: 1.75rem; } }
.project-tagline {
margin-bottom: 2rem;
font-weight: normal;
opacity: 0.7; }
@media screen and (min-width: 64em) {
.project-tagline {
font-size: 1.25rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.project-tagline {
font-size: 1.15rem; } }
@media screen and (max-width: 42em) {
.project-tagline {
font-size: 1rem; } }
.main-content :first-child {
margin-top: 0; }
.main-content img {
max-width: 100%; }
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
margin-top: 2rem;
margin-bottom: 1rem;
font-weight: normal;
color: #159957; }
.main-content p {
margin-bottom: 1em; }
.main-content code {
padding: 2px 4px;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 0.9rem;
color: #383e41;
background-color: #f3f6fa;
border-radius: 0.3rem; }
.main-content pre {
padding: 0.8rem;
margin-top: 0;
margin-bottom: 1rem;
font: 1rem Consolas, "Liberation Mono", Menlo, Courier, monospace;
color: #567482;
word-wrap: normal;
background-color: #f3f6fa;
border: solid 1px #dce6f0;
border-radius: 0.3rem; }
.main-content pre > code {
padding: 0;
margin: 0;
font-size: 0.9rem;
color: #567482;
word-break: normal;
white-space: pre;
background: transparent;
border: 0; }
.main-content .highlight {
margin-bottom: 1rem; }
.main-content .highlight pre {
margin-bottom: 0;
word-break: normal; }
.main-content .highlight pre, .main-content pre {
padding: 0.8rem;
overflow: auto;
font-size: 0.9rem;
line-height: 1.45;
border-radius: 0.3rem; }
.main-content pre code, .main-content pre tt {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0; }
.main-content pre code:before, .main-content pre code:after, .main-content pre tt:before, .main-content pre tt:after {
content: normal; }
.main-content ul, .main-content ol {
margin-top: 0; }
.main-content blockquote {
padding: 0 1rem;
margin-left: 0;
color: #819198;
border-left: 0.3rem solid #dce6f0; }
.main-content blockquote > :first-child {
margin-top: 0; }
.main-content blockquote > :last-child {
margin-bottom: 0; }
.main-content table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all; }
.main-content table th {
font-weight: bold; }
.main-content table th, .main-content table td {
padding: 0.5rem 1rem;
border: 1px solid #e9ebec; }
.main-content dl {
padding: 0; }
.main-content dl dt {
padding: 0;
margin-top: 1rem;
font-size: 1rem;
font-weight: bold; }
.main-content dl dd {
padding: 0;
margin-bottom: 1rem; }
.main-content hr {
height: 2px;
padding: 0;
margin: 1rem 0;
background-color: #eff0f1;
border: 0; }
@media screen and (min-width: 64em) {
.main-content {
max-width: 64rem;
padding: 2rem 6rem;
margin: 0 auto;
font-size: 1.1rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.main-content {
padding: 2rem 4rem;
font-size: 1.1rem; } }
@media screen and (max-width: 42em) {
.main-content {
padding: 2rem 1rem;
font-size: 1rem; } }
.site-footer {
padding-top: 2rem;
margin-top: 2rem;
border-top: solid 1px #eff0f1; }
.site-footer-owner {
display: block;
font-weight: bold; }
.site-footer-credits {
color: #819198; }
@media screen and (min-width: 64em) {
.site-footer {
font-size: 1rem; } }
@media screen and (min-width: 42em) and (max-width: 64em) {
.site-footer {
font-size: 1rem; } }
@media screen and (max-width: 42em) {
.site-footer {
font-size: 0.9rem; } }
================================================
FILE: tmp/.gitignore
================================================
*
!.gitignore
================================================
FILE: vimrc
================================================
" =======================================
" Initially based on/forked from: Jeremy Mack (@mutewinter)
" [http://github.com/luan/vimfiles]
" Maintained By: Luan Santos (GitHub: @luan)
" =======================================
silent! source ~/.vimrc.local.before
runtime! Plug.vim
runtime! config/basic.vim
runtime! config/bindings.vim
runtime! config/colors.vim
runtime! config/paste.vim
" ----------------------------------------
" Plugin Configuration
" ----------------------------------------
runtime! config/plugin/ack.vim
runtime! config/plugin/airline.vim
runtime! config/plugin/ale.vim
runtime! config/plugin/autoformat.vim
runtime! config/plugin/better-whitespace.vim
runtime! config/plugin/fugitive.vim
runtime! config/plugin/livedown.vim
runtime! config/plugin/goyo.vim
runtime! config/plugin/multicursor.vim
runtime! config/plugin/ncm.vim
runtime! config/plugin/nerdtree.vim
runtime! config/plugin/signify.vim
runtime! config/plugin/tagbar.vim
runtime! config/plugin/tcomment.vim
runtime! config/plugin/ultisnips.vim
runtime! config/plugin/undotree.vim
if has('gui_running')
runtime! config/plugin/ctrlp.vim
else
runtime! config/plugin/fzf.vim
end
" ----------------------------------------
" Language Configuration
" ----------------------------------------
runtime! config/lang/c.vim
runtime! config/lang/crontab.vim
runtime! config/lang/elm.vim
runtime! config/lang/golang.vim
runtime! config/lang/javascript.vim
runtime! config/lang/markdown.vim
runtime! config/lang/ruby.vim
runtime! config/lang/rust.vim
runtime! config/lang/vue.vim
runtime! config/lang/yaml.vim
" ----------------------------------------
" Lib load path
" ----------------------------------------
runtime! lib/functions.vim
runtime! lib/autocommands.vim
runtime! lib/watchforchanges.vim
silent! source ~/.vimrc.local
gitextract_1ncepq4u/ ├── .gitignore ├── .gitmodules ├── .travis.yml ├── .vintrc.yaml ├── CNAME ├── Plug.vim ├── README.md ├── UltiSnips/ │ └── go.snippets ├── bin/ │ ├── install │ └── update ├── config/ │ ├── basic.vim │ ├── bindings.vim │ ├── colors.vim │ ├── lang/ │ │ ├── c.vim │ │ ├── crontab.vim │ │ ├── elm.vim │ │ ├── golang.vim │ │ ├── javascript.vim │ │ ├── markdown.vim │ │ ├── ruby.vim │ │ ├── rust.vim │ │ ├── vue.vim │ │ └── yaml.vim │ ├── paste.vim │ └── plugin/ │ ├── ack.vim │ ├── airline.vim │ ├── ale.vim │ ├── autoformat.vim │ ├── better-whitespace.vim │ ├── ctrlp.vim │ ├── fugitive.vim │ ├── fzf.vim │ ├── goyo.vim │ ├── livedown.vim │ ├── multicursor.vim │ ├── ncm.vim │ ├── nerdtree.vim │ ├── signify.vim │ ├── tagbar.vim │ ├── tcomment.vim │ ├── ultisnips.vim │ └── undotree.vim ├── gvimrc ├── index.html ├── lib/ │ ├── autocommands.vim │ ├── functions.vim │ └── watchforchanges.vim ├── params.json ├── scripts/ │ ├── gotags │ └── test ├── stylesheets/ │ ├── github-light.css │ ├── normalize.css │ └── stylesheet.css ├── tmp/ │ └── .gitignore └── vimrc
Condensed preview — 55 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (106K chars).
[
{
"path": ".gitignore",
"chars": 159,
"preview": "*~\n.DS_Store\n.cache\n.netrwhist\n.rake_tasks~\n.undo/*\nautoload/\nbin/elm-format\nbundle/\nftplugin/\ngobin/\ngopath/\ngotags/\npl"
},
{
"path": ".gitmodules",
"chars": 262,
"preview": "[submodule \"scripts/shell-colors-vim-hybrid\"]\n\tpath = scripts/shell-colors-vim-hybrid\n\turl = https://gist.github.com/0d2"
},
{
"path": ".travis.yml",
"chars": 954,
"preview": "dist: trusty\nsudo: false\n\nenv:\n global:\n - DEPS=$HOME/deps\n - PATH=$DEPS/bin:$PATH\n\naddons: { apt: { packages: [p"
},
{
"path": ".vintrc.yaml",
"chars": 192,
"preview": "cmdargs:\n severity: style_problem\n color: true\n env:\n neovim: true\n\npolicies:\n # this doesn't seem to work very r"
},
{
"path": "CNAME",
"chars": 16,
"preview": "vimfiles.luan.sh"
},
{
"path": "Plug.vim",
"chars": 8471,
"preview": "call plug#begin('~/.vim/plugged')\n\n\" Defaults {{{\nPlug 'tpope/vim-sensible'\n\" }}}\n\n\" Navigation {{{\n\" Displays tags in a"
},
{
"path": "README.md",
"chars": 7436,
"preview": "# The Vim Configuration. [](https://travis-ci.org/"
},
{
"path": "UltiSnips/go.snippets",
"chars": 1700,
"preview": "# More snippets for Go\n\nsnippet println \"fmt.Println(...)\"\nfmt.Println(${0:${VISUAL}})\nendsnippet\n\nsnippet printf \"fmt.P"
},
{
"path": "bin/install",
"chars": 6771,
"preview": "#!/usr/bin/env bash\n\nset -eu -o pipefail\n\ndeclare UPDATE=0 INTERACTIVE=1\ndeclare VIMCMD='vim'\ndeclare NPM='npm'\ndeclare "
},
{
"path": "bin/update",
"chars": 101,
"preview": "#!/usr/bin/env bash\n\npushd $HOME/.vim > /dev/null\ngit pull\n~/.vim/bin/install -u $@\npopd > /dev/null\n"
},
{
"path": "config/basic.vim",
"chars": 2663,
"preview": "\" ----------------------------------------\n\" Regular Vim Configuration (No Plugins Needed)\n\" ---------------------------"
},
{
"path": "config/bindings.vim",
"chars": 2439,
"preview": "\" ----------------------------------------\n\" Bindings\n\" ----------------------------------------\n\n\" Note: This line MUST"
},
{
"path": "config/colors.vim",
"chars": 2559,
"preview": "let g:gruvbox_italic=1\n\nlet s:colors = [\n \\ 'hybrid',\n \\ 'gruvbox',\n \\ 'base16-3024',\n \\ 'base16-apa"
},
{
"path": "config/lang/c.vim",
"chars": 631,
"preview": "let s:projections = {\n \\ '*.c': {'type': 'c', 'alternate': ['{}.h']},\n \\ '*.h': {'type': 'c', 'alternate': ['{"
},
{
"path": "config/lang/crontab.vim",
"chars": 103,
"preview": "augroup luan_crontab\n autocmd!\n autocmd FileType crontab setlocal nobackup nowritebackup\naugroup END\n"
},
{
"path": "config/lang/elm.vim",
"chars": 134,
"preview": "\" show types in autocomplete menu\nlet g:elm_detailed_complete = 1\nlet g:elm_format_autosave = 1\nlet g:elm_syntastic_show"
},
{
"path": "config/lang/golang.vim",
"chars": 2941,
"preview": "\" vim-go setup\nlet g:go_fmt_autosave = 0\nlet g:go_fmt_command = 'goimports'\nlet g:go_fmt_fail_silently = 1\n\n\" this break"
},
{
"path": "config/lang/javascript.vim",
"chars": 316,
"preview": "let g:javascript_plugin_flow = 1\nlet g:used_javascript_libs = 'jquery,underscore,vue,jasmine,ramda,d3,react'\n\naugroup lu"
},
{
"path": "config/lang/markdown.vim",
"chars": 239,
"preview": "augroup luan_markdown\n autocmd!\n autocmd BufNewFile,BufRead *.md setlocal spell | setlocal lbr | setlocal nonu\naugroup"
},
{
"path": "config/lang/ruby.vim",
"chars": 132,
"preview": "augroup luan_ruby\n autocmd FileType ruby setlocal ts=2 sts=2 sw=2 norelativenumber nocursorline re=1 foldmethod=syntax\n"
},
{
"path": "config/lang/rust.vim",
"chars": 27,
"preview": "let g:rustfmt_autosave = 0\n"
},
{
"path": "config/lang/vue.vim",
"chars": 221,
"preview": "augroup luan_vue\n autocmd!\n autocmd BufWritePost *.vue syntax sync fromstart\n autocmd BufReadPost *.vue syntax sync f"
},
{
"path": "config/lang/yaml.vim",
"chars": 194,
"preview": "\" disable fucking stupid yaml indenting logic\naugroup luan_yml\n autocmd!\n autocmd FileType yaml setlocal indentexpr=\n "
},
{
"path": "config/paste.vim",
"chars": 339,
"preview": "\" I haven't found how to hide this function (yet)\nfunction! RestoreRegister()\n let @\" = s:restore_reg\n return ''\nendfu"
},
{
"path": "config/plugin/ack.vim",
"chars": 187,
"preview": "if executable('rg')\n let g:ackprg = 'rg --vimgrep'\nelseif executable('ag')\n let g:ackprg = 'ag --vimgrep'\nendif\n\ncnore"
},
{
"path": "config/plugin/airline.vim",
"chars": 460,
"preview": "let g:airline_theme = 'tomorrow'\nif !exists('g:airline_powerline_fonts')\n if (has('gui_running') && &guifont =~# 'for P"
},
{
"path": "config/plugin/ale.vim",
"chars": 452,
"preview": "scriptencoding utf-8\n\nnmap <silent> <C-S-k> <Plug>(ale_previous_wrap)\nnmap <silent> <C-S-j> <Plug>(ale_next_wrap)\n\nlet g"
},
{
"path": "config/plugin/autoformat.vim",
"chars": 267,
"preview": "let g:autoformat_autoindent = 0\nlet g:autoformat_retab = 0\n\nlet g:formatters_javascript = ['eslint_local']\nlet g:formatt"
},
{
"path": "config/plugin/better-whitespace.vim",
"chars": 39,
"preview": "let g:better_whitespace_operator='_s'\n\n"
},
{
"path": "config/plugin/ctrlp.vim",
"chars": 1141,
"preview": "let g:ctrlp_match_window = 'bottom,order:ttb,min:1,max:10,results:50'\nlet g:ctrlp_clear_cache_on_exit = 1\nlet g:ctrlp_ca"
},
{
"path": "config/plugin/fugitive.vim",
"chars": 249,
"preview": "nnoremap <leader>gs :Gstatus<cr>\nnnoremap <leader>gb :Gblame<cr>\nnnoremap <leader>gg :Gbrowse<cr>\nnnoremap <leader>gl :G"
},
{
"path": "config/plugin/fzf.vim",
"chars": 1138,
"preview": "function! s:buflist()\n redir => l:ls\n silent ls\n redir END\n return split(l:ls, '\\n')\nendfunction\n\nfunction! s:bufope"
},
{
"path": "config/plugin/goyo.vim",
"chars": 1022,
"preview": "function! s:goyo_enter()\n silent !i3-msg fullscreen || true\n silent !tmux set status off || true\n silent !tmux list-p"
},
{
"path": "config/plugin/livedown.vim",
"chars": 28,
"preview": "nmap gm :LivedownToggle<CR>\n"
},
{
"path": "config/plugin/multicursor.vim",
"chars": 377,
"preview": "\" Called once right before you start selecting multiple cursors\nfunction! Multiple_cursors_before()\n if exists(':NeoCom"
},
{
"path": "config/plugin/ncm.vim",
"chars": 353,
"preview": "if !has('python3')\n augroup luan_ncm\n autocmd!\n autocmd VimEnter *\n \\ echohl Error | echomsg '[vimfiles]"
},
{
"path": "config/plugin/nerdtree.vim",
"chars": 478,
"preview": "\" ---------------\n\" NERDTree\n\" ---------------\nnnoremap <leader>nn :NERDTreeToggle<CR>\nnnoremap \\ :NERDTreeToggle<CR>\nnn"
},
{
"path": "config/plugin/signify.vim",
"chars": 75,
"preview": "let g:signify_update_on_bufenter = 1\nlet g:signify_disable_by_default = 0\n\n"
},
{
"path": "config/plugin/tagbar.vim",
"chars": 405,
"preview": "let g:tagbar_type_css = {\n \\ 'ctagstype' : 'Css',\n \\ 'kinds' : [\n \\ 'c:classes',\n \\ 's:selectors"
},
{
"path": "config/plugin/tcomment.vim",
"chars": 119,
"preview": "nmap <leader>ci :TComment<cr>\nxmap <leader>ci :TComment<cr>\n\nnmap <leader>/ :TComment<cr>\nxmap <leader>/ :TComment<cr>\n"
},
{
"path": "config/plugin/ultisnips.vim",
"chars": 173,
"preview": "let g:UltiSnipsExpandTrigger='<c-j>'\nlet g:UltiSnipsJumpForwardTrigger='<c-f>'\nlet g:UltiSnipsJumpBackwardTrigger='<c-b>"
},
{
"path": "config/plugin/undotree.vim",
"chars": 39,
"preview": "nnoremap <leader>u :UndotreeToggle<cr>\n"
},
{
"path": "gvimrc",
"chars": 258,
"preview": "\" Unbind these keys for different bindings in vimrc\nif has('gui_macvim')\n \" D-p\n macmenu &File.Print key=<nop>\n\n \" D-"
},
{
"path": "index.html",
"chars": 13819,
"preview": "<!DOCTYPE html>\n<html lang=\"en-us\">\n <head>\n <meta charset=\"UTF-8\">\n <title>Vimfiles by luan</title>\n <meta na"
},
{
"path": "lib/autocommands.vim",
"chars": 935,
"preview": "\" ----------------------------------------\n\" Auto Commands\n\" ----------------------------------------\n\naugroup luan_gene"
},
{
"path": "lib/functions.vim",
"chars": 3832,
"preview": "\" ----------------------------------------\n\" Functions\n\" ----------------------------------------\n\n\" ---------------\n\" C"
},
{
"path": "lib/watchforchanges.vim",
"chars": 6858,
"preview": "\" If you are using a console version of Vim, or dealing\n\" with a file that changes externally (e.g. a web server log)\n\" "
},
{
"path": "params.json",
"chars": 8035,
"preview": "{\n \"name\": \"Vimfiles\",\n \"tagline\": \"The Vim Configuration. Uses vim-plug to manage plugins.\",\n \"body\": \"# The Vim Con"
},
{
"path": "scripts/gotags",
"chars": 183,
"preview": "#!/bin/bash\n\nif mkdir \"$LOCKDIR\"\nthen\n\tgotags -silent -L <(find . -iname '*.go') > \"$1\"\n\tgotags -silent -L <(find \"$(go "
},
{
"path": "scripts/test",
"chars": 316,
"preview": "#!/bin/bash\n\nset -xeu\n\necho \"PATH: $PATH\"\necho \"Using vim: $(which vim)\"\nvim --version\n\nfind config lib -name '*.vim' -p"
},
{
"path": "stylesheets/github-light.css",
"chars": 3133,
"preview": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "stylesheets/normalize.css",
"chars": 7699,
"preview": "/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Pre"
},
{
"path": "stylesheets/stylesheet.css",
"chars": 5779,
"preview": "* {\n box-sizing: border-box; }\n\nbody {\n padding: 0;\n margin: 0;\n font-family: \"Open Sans\", \"Helvetica Neue\", Helveti"
},
{
"path": "tmp/.gitignore",
"chars": 14,
"preview": "*\n!.gitignore\n"
},
{
"path": "vimrc",
"chars": 1819,
"preview": "\" =======================================\n\" Initially based on/forked from: Jeremy Mack (@mutewinter)\n\" [http://github.c"
}
]
About this extraction
This page contains the full source code of the luan/vimfiles GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 55 files (96.4 KB), approximately 30.6k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.