Skip to content

vbrunell/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

My Vim

The .vimrc contains my lightweight customized vim configuration.

It contains some useful plugins (NERDTree, CtrlP, YCM) and some handy settings and key mappings.

It will give you directory navigation tools, autocompletion, an updated status bar, and more.

Dependencies

You'll need vim-plug. To install it, open a terminal window and execute:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

For Neovim or Windows users, instructions are available here: https://github.com/junegunn/vim-plug

Installation

Installing this configuration is easy:

  • Clone this repository and copy the .vimrc file to your home directory.
  • Open vim.
  • The plugins should install automagically.

All done!

(If you want to use YCM, read the next section.)

YouCompleteMe Dependencies

To install and use YCM, you'll need cmake. In a terminal execute sudo apt-get install cmake

Once you've done that, navigate to ~/.vim/plugged/YouCompleteMe and execute install.py

C-family Support

In order to use YCM autocompletion with C and C++, you will need clang v3.8 or later.
In a terminal window execute: sudo apt-get install libclang-dev

Then navigate to ~/.vim/plugged/YouCompleteMe and execute install.py --clang-completer

You'll also need to define compilation flags for YCM to reference for each project.

Information on how to achieve this can be found here: https://github.com/Valloric/YouCompleteMe/blob/master/README.md#c-family-semantic-completion

To get up and running fast:

  • Create a .ycm_extra_conf.py Python script in your project's root directory.
  • Add this to function it:
```sh def FlagsForFile( filename, **kwargs ): return { 'flags': [ '-x', 'c++', '-Wall', '-Wextra', '-Werror' ], } ```
  • Save and close.

You should now have autocompletion for your C and C++ projects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published