GithubHelp home page GithubHelp logo

dotfiles-go-vim's Introduction

dotfiles and Vim configuration

These are my dotfiles and Vim configuration to use this awesome editor as a fully-featured IDE for most programming languages.

Polyglot prompt, Git completion and Kubernetes integration

These dotfiles use Polyglot to customize the shell prompt. It also enables bash completion for Git and provides a nice integration with Kubernetes.

These featuers can be installed as follows:

# Clone the repo and get the polyglot fork
git clone https://github.com/nacx/dotfiles.git
cd dotfiles
git submodule update --init

# Source the provided `.bashrc` file (the one in the cloned repo) and consider adding it
# to your existing `.bashrc`.
source .bashrc

Vim features

  • File explorer and quick search.
  • Language objects information such as classes, methods, variables, etc.
  • Code completion.
  • Integrated Git status information.
  • Easy buffer navigation between open files.
  • Integrated terminal.

vim

Prerequisites

In order to use the Vim plugins the following pieces have to be installed manually:

  • curl
  • Git
  • Exuberant ctags >= 5.5
  • Python3 and its development libraries
  • tmux (only if you are using the integrated terminal)

If you are using OSX, you will need to install Vim with Homebrew. Otherwise auto-completion will not work since the version of Vim that comes by default is not compiled with Python3 support.

Installation

There is no automatic way to install this, but only a few links need to be created. You can install all the plugins and create the links as follows:

# Install Neovim python3 support
pip3 install neovim

# Clone the repo
git clone https://github.com/nacx/dotfiles.git

# Create the symbolic links in your home
cd ~
ln -s dotfiles/.vimrc
ln -s dotfiles/.vim

Once the links have been created you're done! All the plugins will be automatically installed the first time you open Vim.

Integrated terminal

If you want to use the integrated terminal tmux needs to be installed. You can use the provided tmux configuration by creating the corresponding symlink:

# Create the symbolic for the tmux configuration
cd ~
ln -s dotfiles/.tmux.conf

In order to easily open Vim in a tmux session that allows you to open the console, add the following lines to the .barhrc file:

# Open Vim with tmux
function vim_tmux() {
    VIM_SESSION="vim-${RANDOM}"
    tmux new -s ${VIM_SESSION} -d "VIM_SESSION=${VIM_SESSION} vim $*" \; attach;
}
alias vim='vim_tmux'

Usage cheat sheet

The following keys have been mapped by default:

Shortcut Description
F2 Toggle NERDTree
F3 Toggle Tagbar (it is opened by default in certain source ccode files)
F4 Open a vertical split and show the list of existing buffers
F5 Open a shell in a tmux split
Shift-Left/Right Change to the previous/next buffer
<Ctrl-Space> In INSERT mode opens the autocompletion popup
<Ctrl-p> Opens the CtrlP file search window

dotfiles-go-vim's People

Contributors

maricn avatar nacx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.