• This repository has been archived on 22/Dec/2021
  • Stars
    star
    284
  • Rank 145,616 (Top 3 %)
  • Language
    Vim Script
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

⭐ Vim Frontend is a Vim configured for Front-end Developers.

Vim Frontend: a Vim configured for Front-end Developers.

Licence asciinema

Introduction

Is you a Front-end Developer ? Are you using Sublime Text, Atom, Brackets, Visual Studio Code or anything ?

"Give me a chance. Don't worry, I'm easy πŸ˜„ " - Vim

Quick demo videos

Installation

If you are using Unix/Linux or Mac OS X.

$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
$ sh ./installer.sh {specify the installation directory}

Mac OS X

Pre-requisite:

$ brew install git ctags

Just replace your .vimrc :shipit:

git clone https://github.com/VictorVoid/vim-frontend.git
mv vim-frontend/.vimrc ~/ && mv vim-frontend/autoload/ ~/.vim && mv vim-frontend/ultisnips/ ~/.vim

or

- Download ZIP
cd /Users/yourusername/Download
- Open terminal
unzip vim-frontend-master.zip
mv vim-frontend/.vimrc ~/ && mv vim-frontend/autoload/ ~/.vim && mv vim-frontend/ultisnips/ ~/.vim

YouCompleteMe Plugin INFO: πŸ‘‚

Remember: YCM is a plugin with a compiled component. If you update YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM will notify you to recompile it. You should then rerun the install process.

Don't worry, it's easy πŸ˜„ Let's go.

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install cmake via Homebrew

brew install cmake

Compiling YCM with semantic support for C-family languages:

cd  ~/.cache/dein/repos/github.com/Valloric/YouCompleteMe
./install.py --clang-completer

More info

Linux x64

Pre-requisite:

  • Ubuntu\Debian
$ sudo apt-get install git exuberant-ctags ncurses-term python-jinja2
  • Gentoo
$ sudo emerge dev-util/ctags sys-libs/ncurses dev-vcs/git dev-python/pyflakes dev-python/jinja
  • Arch Linux via pacman (recomend used pacaur)
$ sudo pacman -S git-core ctags ncurses python-jinja
  • Fedora
$ sudo dnf install ncurses-devel git ctags-etags

Just replace your .vimrc :shipit:

git clone https://github.com/VictorVoid/vim-frontend.git
mv vim-frontend/.vimrc ~/ && mv vim-frontend/autoload/ ~/.vim && mv vim-frontend/ultisnips/ ~/.vim

or

- Download ZIP
cd /Users/yourusername/Download
- Open terminal
sudo apt-get install unzip
unzip file.zip -d
mv vim-frontend/.vimrc ~/ && mv vim-frontend/autoload/ ~/.vim && mv vim-frontend/ultisnips/ ~/.vim

YouCompleteMe Plugin INFO: πŸ‘‚

Remember: YCM is a plugin with a compiled component. If you update YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM will notify you to recompile it. You should then rerun the install process.

Ubuntu\Debian:

Install development tools and CMake: sudo apt-get install build-essential cmake

Make sure you have Python headers installed: sudo apt-get install python-dev python3-dev.

Compiling YCM with semantic support for C-family languages:

cd ~/.cache/dein/repos/github.com/Valloric/YouCompleteMe
./install.py --clang-completer

Other distribution
More info

Features Summary

  • Automatic syntax and codestyle checks.
  • JavaScript autocomplete (ternjs)
  • HTML with auto close tag
  • Integration with Git
  • Emmet
  • Snippets
  • TagBar (overview of its structure)
  • Vim Session (restore your Vim editing sessions)
  • Surround (provides mappings to easily delete, change and add such surroundings in pairs)
  • Integration with CSS Pre-processors (SASS, LESS and Stylus)
  • Color preview (css/less/sass/stylus/html)
  • Beautify (HTML, CSS, JS)

User Guide

General Commands

Git

Commands Descriptions
<space>ga Execute git add on current file
<space>gc git commit (splits window to write commit message)
<space>gsh git push
<space>gll git pull
<space>gs git status
<space>gb git blame
<space>gd git diff
<space>gr git remove

Find buffers and file

Commands Descriptions
<space>s Find and open files
<space>b Find file on buffer (open file)
<space>c Close active buffer (clone file)

Navigations

Commands Descriptions
<space>. Set path working directory
:cd <path> Open path /path
<Control>+w+w Alternative navigate vim split panels
<space>w or <space>x Next buffer navigate
<space>q or <space>z previous buffer navigate
SHIFT+n Create a tab
SHIFT+TAB previous tab navigate
TAB next tab navigate
<Control+w>+<hjkl> Navigate via split panels
F2 Open tree navigate in actual opened file
F3 Open/Close tree navigate files
F4 List all class and method, support for python, go, lua, ruby and php
<space>+0 Focus on tree navigate files

Sessions

Commands Descriptions
<space>so Open Session
<space>ss Save Session
<space>sd Delete Session
<space>sc Close Session

Code

Commands Descriptions
> indent to right
< indent to left
gc Comment or uncomment lines that {motion} moves over
YY Copy to clipboard
<space>p Paste
<Control+l> UltiSnips Expand Trigger
<Control+y>, Activate Emmet plugin

Splits

Commands Descriptions
<space>v Split vertical
<space>h Split horizontal

Learning Vim

You can learn basic vim here:

Super Fast Navigation

Commands Descriptions
e Move to the end of a word
w ➑️ Move forward to the beginning of a word ->
W ➑️ Move forward a WORD (any non-whitespace characters)
b ⬅️ Move backward to the beginning of a word
( ⬇️ Jump backward one sentence
) ⬆️ Jump forward one sentence.
3w, 3b ↔️ Move forward three words, Move backward three words
$ Move to the end of the line
0" Move to the beginning of the line
H Jump to the top of the screen
M Jump to the middle of the screen
L Jump to the bottom of the screen
mx Set mark x at the current cursor position
'x Jump to the beginning of the line of mark x
``x` Jump to the cursor position of mark x
HTML Visual Navigation Descriptions
at Select the outer tag block by pressing
it Select the inner tag block

HTML Commands

asciicast

Commands Descriptions
html5+<ctrl l> snippet html tree
css+<ctrl l> snippet link css
ysiw wrap tag in word
yss wrap the entire line
cst <updatetag> change tag to update tag
cs"' change " to '
ds" remove the delimiters entirely
dst" remove the delimiters entirely (t == tag)

Navigating HTML tags in Vim

  1. Enter visual mode
  2. Select the outer tag block by pressing a + t or i + t for inner tag block.

JavaScript Commands

JavaScript ES6 React

asciicast

vf

var functioname = function (arg){
    //
}

**

/**
*
**/

ex

module.exports = yourmod

css

{yourobj}.css('atribuite', 'value')

qs

document.querySelector('selector')

document.querySelectorAll('selector') //qsa

trf

try {

} catch (e) {

} finally {

}

proto

class_name.prototype.method_name = function(){
    
}

props

var my_object = Object.defineProperties{
    new Object(),
    {
        property: {
            get: function my_object_property_getter(){
            
            },
            set: function my_object_property_setter(value){
            
            },
            value       : value,
            writeable   : boolean,
            enumerable  : boolean,
            configurable: boolean
        }
    }
}

us

'use strict';

=>

( ) => {

}

cla

Class classname{


}

clax

Class classname extends classname{

}

imp

import ModuleName from 'ModuleName'

cc

const app = React.createClass({
    render: function(){
    
    }
})

cdm

componentDidMount: function(){

},

gis

getInitialState: function(){
    return {
    
    };
},

AngularJS 1 e 2

asciicast

Commands Directive
na ng-app=""
nc ng-click=""
nctrl ng-controller=""
ncl ng-class=""
nm ng-model=""
ns ng-show=""
nh ng-hide=""
nb ng-bind=""
{{ {{}}
n2c (click)=""
n2dbc (dblclick)=""
n2ctrl ngController=""
n2m [(ngModel)]=""
n2cl [ngClass]=""

ngsa

 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/x.x.xx/angular.js"></script> 

$v

$scope.variable = value;

ngc

var controllerName = function(scope, injectables){

};

ngfor

angularforEach(iterateOver, function(value, key){
    
});

ngm

angular.module('moduleName', [moduleDependencies]);

ngma

var moduleName = angular.module('moduleName', [moduleDeps]);

ngmfa

factory('factoryName', function(dependencies){

});

ngms

service('serviceName', function(injectables){

});

ngmfi

filter('filterName', function(injectables){
    return function(inputs, args){
    
    };
});

ngrwr

$routeProvider.when('url', {
    templateUrl: 'templateUrl',
    controller: 'controller',
    resolve: {
    
    }
});

ngro

$routeProvider.otherwise({
    redirectTo: 'url'
});

TypeScript

Snippets from Martin Prins

ng2-component-root  // Angular 2 root App component
ng2-bootstrap     // Angular 2 bootstraping, for main.ts
ng2-component     // Angular 2 component
ng2-pipe          // Angular 2 pipe
ng2-route-config  // Angular 2 @RouteConfig
ng2-route-path    // Angular 2 routing path
ng2-service       // Angular 2 service
ng2-subscribe     // Angular 2 observable subscription

CSS Commands

CSS Abbreviations

More Repositories

1

dinoql

A customizable GraphQL style query language for interacting with JavaScript objects.
JavaScript
1,047
star
2

space-jekyll-template

A simple spacemacs template on jekyll. https://victorvoid.github.io/space-jekyll-template/
Stylus
400
star
3

placeload.js

The best way to create a placeholder layout effect using pure js. 🐨 Like Facebook, Slack, Medium, etc.
JavaScript
218
star
4

formap

A reagent library to build awesome dynamic forms. πŸ”¨
Clojure
14
star
5

asciilang

πŸ‘Š Foreign languages for developers
JavaScript
12
star
6

generator-capybara

πŸ’  Generator for front-end with Atomic Design + Stylus + Webpack + Rupture + Kouto-Swiss + Jeet + ES6 + BrowserSync.
JavaScript
11
star
7

tutorial-clojurescript

Um tutorial de ClojureScript para seres humanos. 😈
JavaScript
10
star
8

gatsby-plugin-static-props

An implementation from 'getStaticProps' from Next.js to Gatsby via Plugin πŸͺ›
JavaScript
7
star
9

react-listable

A collection of react components that iterates over the 'each' prop and renders the 'render' prop. πŸ”’
JavaScript
7
star
10

babel-plugin-change-import

This plugin is a transform to remove unused library dependencies, without forcing the user to cherry pick import manually. This lets you use libraries naturally without worrying about bundling parts you're not using.
JavaScript
4
star
11

beware

A micro library to improve the user experience on your website. 🐦
JavaScript
3
star
12

packblade

Packblade is the best way to you automate the installation of your apps and dotfiles.
JavaScript
2
star
13

awesome-vimrc-list

A list of awesome vimrc.
2
star
14

victorlast.github.io

HTML
2
star
15

genS

Sorts file values using external memory, and generates random number files.
C
2
star
16

workshop-graphql

JavaScript
2
star
17

barrHub

A SPA in ClojureScript using GitHub API.
Clojure
2
star
18

StudyGo-Annotation

Interface de anotaçáes/serve como blog de estudos.
PHP
2
star
19

vitas-maker

HTML
2
star
20

codelang

Practise a foreign language fast and easy, and improve your communication skills while you're developing.
JavaScript
2
star
21

remember.chrome

A chrome alarm manager to schedule code to run periodically or at a specified time in the future.
JavaScript
2
star
22

eight-ball

😼 A impossible multiplayer game, if you is very fast, unfortunately you're not going to make it.
Java
1
star
23

seusalario

1
star
24

input-fullscreen

1
star
25

tobby

🐸 A library for DOM manipulate and rendering HTML in ClojureScript.
Clojure
1
star
26

Calculator-windows

A calculator in Java SE :bowtie:
Java
1
star