• This repository has been archived on 09/Jun/2022
  • Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    Vim Script
  • Created over 12 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Vim Configuration. Uses vim-plug to manage plugins.

The Vim Configuration. Build Status

If you're trying to use this config checkout this cheat sheet.


This vimfiles support both standard vim and neovim, I'd encourage you to give neovim a try.

If you're using neovim follow this guide in order to get it properly setup. The autocompletion plugin we use needs python3 support 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
  2. Installation
  3. Additional Dependencies 1. ctags
  4. Updating
  5. Customizing
  6. Changing Configuration
  7. Adding Plugins
  8. Functionality
  9. Defaults Overridden
  10. 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. If you have a feature or fix to submit, feel free to fork and send a PR.


Installation

As simple as:

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 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

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:

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:

~/.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

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 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:

colorscheme gruvbox

Enabling auto save:

" will save automatically when leaving the buffer
" 0 or 1, defaults 0
let g:autosave = 1

Disabling deoplete:

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:

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:

" 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 in the comments. It also strives to not override default behavior, although that's not always possible.

There's space to write some guides 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 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.

A few overridden are worth mentioning:

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.

set iskeyword+=$,@,-

Add extra characters that are valid parts of variables.


Screenshots

Default colorscheme: hybrid

hybrid

Alternate colorscheme: monokai

monokai

More Repositories

1

carrierwave-ftp

Allows file upload using FTP for CarrierWave uploaders.
Ruby
82
star
2

nvim

Luan's Neovim distribution
Lua
60
star
3

ember-facebook

A simple facebook library for Ember.js - Check example below
JavaScript
40
star
4

ember-formbuilder

OBSOLETE - Ember FormBuilder is a form builder implementation for Ember.js and Handlebars. It's inspired by the Rails form builders, simple_form and formtastic.
JavaScript
37
star
5

dotfiles

My preferences and automation
Shell
15
star
6

vim-concourse

Syntax detection and highlighting for http://concourse.ci pipeline files
Vim Script
14
star
7

vipe

Send test commands to a pipe.
Ruby
12
star
8

tmuxfiles

Shell
9
star
9

slenderaac

TypeScript
8
star
10

chronic-l10n

Pack of locales for localizing Chronics date parsing.
Ruby
8
star
11

vscode-project-scopes

Project Scopes extension for VSCode
TypeScript
7
star
12

ember-facebook-example

A facebook client on ember.js
JavaScript
6
star
13

slender-launcher

Go
5
star
14

knn

K-Nearest Neighbors implementation
Ruby
4
star
15

zed-wgsl

Scheme
4
star
16

lodos

Todos application using Rails and Ember.js
JavaScript
3
star
17

raw-ftp-client-server

Trabalho um de Redes I em C.
C
3
star
18

tibiawiki

Python
2
star
19

teapot

Go
2
star
20

luan.github.io

My cute developer blog.
HTML
2
star
21

c3sl.web

JavaScript
2
star
22

tiego

Go
2
star
23

ember-soundmanager-part2

JavaScript
2
star
24

gogue

Go
1
star
25

tibia-client

1
star
26

try-ember

JavaScript
1
star
27

flytags

Go
1
star
28

envoy-release

Shell
1
star
29

mars-rovers

Mars Rovers basic solution in plain ruby
Ruby
1
star
30

kak

Kakoune's config files
Shell
1
star
31

digitalgarden

SCSS
1
star
32

parallel-sound-filter

C
1
star
33

old-luan.github.com

1
star
34

tibia-sprites

Go
1
star
35

modos

Todos app with Meteor
1
star
36

luansevka

Shell
1
star
37

tea

Go
1
star
38

boshtags

ctags for bosh manifests and cloud configs
Go
1
star
39

try-backbone

Ruby
1
star
40

proxy-pinger

HTML
1
star
41

bevy_stroked_text

Rust
1
star