GithubHelp home page GithubHelp logo

neovimfiles's Introduction

Strika's Neovim configuration

Thanks to these guys:

Installation:

Prerequisites: git, ack.

  1. Move your existing configuration somewhere else: mv ~/.config/nvim* nvim_backup
  2. Clone this repo into ".config/nvim": git clone https://github.com/bmarkons/neovimfiles ~/.config/nvim
  3. Go into ".config/nvim" and run "install": cd ~/.config/nvim && ./install

This will create temp and backup directories and install plugins. If plugin installation fails for any reason, open Neovim and run :PlugInstall.

Features:

  • 2 spaces, no tabs
  • 'Leader' character mapped to " " (space)
  • <CR> - remove highlighting after search
  • <C-j/k/h/l> - switch between splits (no need to prepend <C-w>)
  • relative line numbers by default
  • <C-n> switches between relative and absolute line numbers
  • Q - format lines
  • (space, space) - alternates between two most recent buffers
  • <leader>f - opens file search with :CtrlP plugin:
    • <leader>b - search in directory of current buffer
    • <leader>gl - in lib/
    • <leader>gm - in app/models
    • <leader>gv - in app/views
    • <leader>gc - in app/controllers
    • <leader>gs - in specs
  • :KillWhitespace - strip trailing whitespace
  • <leader>s opens spec
  • <leader>v opens spec in split view

Ack

  • :Ack -w foo_bar --no-js --no-css
  • :Ack! - search, but don't jump to first match
  • :AckFromSearch
  • :AckAdd - append to existing quickfix list
  • <leader>a - opens Ack with cursor between ""
  • <leader>A - opens Ack and searches for the word below cursor

Surround

  • cs"' - change string from double to single quotes
  • ds( - delete surrounding parentheses
  • ysiW] - surround current WORD with square brackets
  • ysst - surround current line in a HTML tag
  • ysip<c-t> - nest current paragraph in a HTML tag

Visual mode: S. Insert mode: <c-s>.

Surround + rails.vim:

  • -<% -%>
  • =<%= %>
  • #<%# %>
  • e - nest block and append end keyword
  • E - like e, but prompt for text to prepend before block

Commentary

  • \\{motion} - comment/uncomment lines that {motion} moves over
  • \\\ - comment/uncomment [count] lines
  • {Visual}\\ - comment/uncomment the highlighted lines
  • \\u - uncomment the current and adjacent commented lines

ruby.vim

Motions:

  • ]m / [m - next / previous method
  • ]M / [M - end of method definition
  • ]] / [[ - next / previous class/module
  • ][ / [] - end of class/module

Text objects:

  • am - a method
  • im - inner method
  • aM - a class
  • iM - inner class

matchit.vim

% alternates between matching HTML tags, class/control flow statements and matching end in Ruby, and more. Also works in visual mode.

Tabular

In visual mode:

  • :Tabularize assignment
  • :Tabularize argument_list
  • :Tabularize /=>

Fugitive

  • :Gcommit
  • :Gstatus
    • jump between lines that represent files with <c-n>, <c-p>
    • - - add/reset file (visual mode too)
    • <Enter> - open current file in the window below
    • p - run git add --patch for current file
    • C - invoke :Gcommit
  • :[range]Gbrowse! - - copy GitHub URL for code that's currently selected
  • :[range]Gblame
  • :Gedit feature:% - version of the current file in the "feature" branch
  • :Gwrite - add %
  • :Gread - checkout %
  • :Gremove - rm %
  • :Gmove <dest> - mv % <dest>

Plugins:

  • ack.vim
  • ctrlp.vim
  • gruvbox
  • neomake
  • rename.vim
  • ri.vim
  • splitjoin.vim
  • tabular
  • vim-airline
  • vim-airline-themes
  • vim-commentary
  • vim-endwise
  • vim-es6
  • vim-fugitive
  • vim-numbertoggle
  • vim-polyglot
  • vim-rails
  • vim-reek
  • vim-repeat
  • vim-surround
  • vim-test
  • vim-textobj-rubyblock
  • vim-textobj-user

Included colorschemes:

  • gruvbox

neovimfiles's People

Contributors

strika avatar shiroyasha avatar darkofabijan 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.