Source directory creating script for competitive programmers who are using c++ and neovim
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

19 wiersze
374 B

  1. # create.sh
  2. echo $'cp template.cpp $1.cpp\nnvim -s .gg $1.cpp' > create.sh
  3. # template
  4. read -n 1 -r -s -p $'Press any key to create template file...\n'
  5. nvim template.cpp
  6. # start line
  7. read -p $'Enter starting line of cursor:\n' line
  8. ((line=line-1))
  9. echo "$line"gg > .gg
  10. # run.sh
  11. echo $'g++ -g $1\n./a.out' > run.sh
  12. # make all executable
  13. chmod +x create.sh
  14. chmod +x run.sh