-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCP_notes.txt
More file actions
59 lines (52 loc) · 1.92 KB
/
CP_notes.txt
File metadata and controls
59 lines (52 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Vim Setup
1.Install vim
2.Install vimrc using "https://github.com/amix/vimrc"
3.Download colorscheme from this repo "https://github.com/crusoexia/vim-monokai"
4."mkdir -p ~/.vim/colors"
5.Copy monokai.vim to ~/.vim/colors
6.In file .vimrc add these
syntax on
colorscheme "file_name"
7.Compile and Run using :
g++ "file_name.cpp" && ./a.out
Vim Setup Code
sudo apt-get install vim
sudo apt-get install git
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
mkdir -p ~/.vim/colors
(download monokai.vim using above repo, or your google drive)
(extract monokai.vim to home)
sudo cp /home/autoratch/monokai.vim /home/autoratch/.vim/colors/
(add code in .vimrc using above code)
Tips from PeppaPig
keymap compile run (compile and run using shortcut)
go into .vim_runtime
open (or create) my_configs.vim
add this code
map <C-c> :!g++ % -o ~/compile.out && ~/compile.out
<C-c> is ctrl-c
now you can compile and run in vim using ctrl-c
you can use vim to keymap commands in terminal
map <C-x> :!"your command without quotes"
this will enable you to press ctrl-x instead of typing the command
Warning ***Do not use HTTPS for git***
Git Setup Github
*for new computer generate ssh key by running this in terminal*
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
open file ~/.ssh/id_rsa.pub in gedit
go to Settings in github page
then ssh key
click new ssh key
copy and paste in lower block
git clone "your SSH"
Git Setup GitLab
git clone "your SSH key"
git config --global user.name "Your Username"
git config --global user.email "Your Email"
Git Push
git add --all
git commit -m "commit_message"
git push
Copy file to clipboard
xsel -b < filename.cpp