-
Notifications
You must be signed in to change notification settings - Fork 13
Aug 30
Chris Ortman edited this page Oct 4, 2016
·
1 revision
- CCA Computer Club http://ccaprogramming.org
- App-A-Thon September 24, Congressional App Challenge, Cedar Rapids?
- Review basic shell commands ->
pwd
,cd
,ls
,man
,touch
,rm
,cp
,mv
- Review basic operators ->
+
,-
,*
,/
,%
,<
,>
,<=
,>=
- Setup shell
echo "export GIT_EDITOR=vim" >> ~/.profile
then restart cloud9 workspace - Brief intro to vi
-
git add .
-> Tell git which changes you want. The.
means all -
git commit
-> Record your changes in git. Use:wq
to exit -
git push
-> Send your changes to github - Open a pull request (PR) on github
- vi - good to know because it’s always available
- You should be in your “kNumber” directory
- vi test.txt
- vi is a modal editor
- type a j, it does nothing because you are in command mode
- type an ‘i’
- see the ‘insert’ text at the bottom now you are in ‘insert’ mode
- type j
- now you see the text
- type escape
- you are back in command mode
- type 10.
- what did it do
- type yy
- type 5p
- what did it do
- y = yank p = put/paste
- make sure you are in command mode
- what do h,j,k,l do?
- where have we seen this before?
- move your cursor some place and press x
- now try dd
- x = delete under cursor, dd = delete a line
- to quite, we need :q, what does the message say?
- use ! to override
- open file again
- add some text
- this time :w
- now :q