Skip to content

Instantly share code, notes, and snippets.

@HugoLnx
Created December 12, 2017 18:46
Show Gist options
  • Save HugoLnx/170341e3f9639024bb36322c323f2dc8 to your computer and use it in GitHub Desktop.
Save HugoLnx/170341e3f9639024bb36322c323f2dc8 to your computer and use it in GitHub Desktop.
# You've got to the beginning of the document !!!
# Use G to get to the end of the document
###########
## vimrc ##
###########
git clone [email protected]:HugoLnx/vimrc.git
cd vimrc
cat use.sh
vim use.sh
########################
## Vim Modes ##
########################
## 1. Navigation mode ##
## 2. Insert mode ##
## 3. Select mode ##
## - plain ##
## - line ##
## - block ##
########################
################
## Navigation ##
################
#####
# Directionals (h j k l)
#####
********* ***
** * *
* * ****
** * *
* * ***
****** *
*
************* (arrive here)
#####
# Quick Directionals (J K)
#####
class Video
include Mongoid::Document
include Mongoid::Timestamps
include MongoidSerializer
include VideoSearchHelpers
include SequenceSupport
include ById
include CachedFilterMethods
include HistoryUtils
include FieldUtils
PUBLIC_FIELDS = [
:id,
:legacy_id,
:_type,
:kind,
:adult,
:category,
:channel_id,
:collaborative_upload_id,
:collaborative_upload_user,
:created_at,
:created_by,
:cut_format,
:description,
:duration,
:exhibited_at,
:extended_metadata,
]
end
#####
# Word skip (w b)
#####
go travelling o
v
e
r here skipping words to be quicker a
n
d
*
n
o
w
*
quickly exercise the finish to backwards go will we
#####
# Beginning/end of line ($ _)
#####
now you should not u
s
e the skip word. U
s
e the end of l
i
n
e instead. n
o
c you w
a
o end the use n
t faster backwards go to line f
h
a
...before n
#####
# Beginning/end of document (gg G)
#####
# Just use the shortcuts
#####
# Yank line and Paste (yy Y p P)
# Bonus: Undo/Redo (u CTRL+r)
#####
# Copy this line:
Bob Esponja Calça Quadrada!!!
# And paste around the pink lines using p and P
vive num abacaxi e mora no mar?
"TEM A COR AMARELA E ESPIRRA AGUA?"
se nenhuma bobagem eh o que você quer?
"DIABRURAS AH BORDO E PROBLEMAS COM PEIXE?"
# Now paste 3 times
#####
# Delete line (dd D)
#####
# 1. Delete the ======= lines
# 2. Move the line /\ to be the first
|()|
===========
| |
| |
===========
/ \
/\
===========
===========
/________\
/,,,,\
===========
, ,, ,
===========
===========
, ,
#####
# Delete until
#####
# Delete all the Xs
%{
_
/(| X X X X X X X X
XXX XXXX XXXX XXXX XXXXX
XXXXXXXXXXXX( :
__\ \ _____
(____XXX) `|X X X X XX
XXX XXXX XXXX XXXX XXXXX
(____)| XXX|
XXXXXXXXXXX(____).__|
(___)__XXXXXXXX.|_____
}
###############################
## Navigation -> Insert Mode ##
###############################
#####
# Insertion mode (i)
#####
# Delete the * and insert your name
I am *, the person that will bring awesomeness to Earth.
#####
# Insertion mode at beginning of line (I)
# Insertion mode at the end of line (A)
# Insertion mode at line above (o)
# Insertion mode at line below (O)
#####
# Complete the code to return "ROQUE, Hugo is your name"
def say_full_name
name = ""
last_name = ""
= last_name.upcase + ", " +
return full_name + ending_phrase
end
#####
# Replace (cc C)
#####
# Replace bad with good
bad
bad
This apple is really bad, it has a increadible bad taste. bad
#################
## Select mode ##
#################
#####
# Plain (v)
#####
# Replace O by + using plain selection
++++++OOO++++++
++++++++++++OOO
OOO++++++++++++
#####
# Line (V)
#####
# Replace O by + using line selection
+++++++++++++++
OOOOOOOOOOOOOOO
+++++++++++++++
OOOOOOOOOOOOOOO
OOOOOOOOOOOOOOO
OOOOOOOOOOOOOOO
+++++++++++++++
#####
# Block (CTRL+v)
#####
# Replace O by + using block selection
+++++++++++++++
+++OOO+++++++++
+++OOO+++++++++
+++OOO+++++++++
+++++++++++++++
++OOO++OOO+OOO+
++OOO++OOO+OOO+
++OOO++OOO+OOO+
+++++++++++++++
# type "117 gg" and you will go to line 106.
# You've got to the ending of the document !!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment