Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Vim 入門

1,016 views

Published on

Vim の入門です。
2018/12/22 合同勉強会 in 大都会岡山 にておこなった LT の資料です。

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Vim 入門

  1. 1. Vim @mike_neck
  2. 2. • • twitter: @mike_neck • 4 • vim ( ) • LisB Java
  3. 3. direct
  4. 4. Vim
  5. 5. Vim • Vim( Vi IMproved ) vi • Amiga Windows Unix OS Emacs • 2000 OS vi Vim vi Vim • vi • Vim (Vim script) • Wikipedia(https://ja.wikipedia.org/wiki/Vim)
  6. 6. Vim centos7/Amazon Linux 2 Ubuntu
  7. 7. $ sudo yum install -y git ncurses-devel $ sudo yum groupinstall -y “Development Tools” git/ncurses-devel/Development Tools
  8. 8. Vim $ git clone https://github.com/vim/vim.git
  9. 9. Vim $ cd vim $ ./configure --with-features=normal --prefix=$HOME/release $ make $ make install $PATH
  10. 10. ldd libtinfo.so release/lib $ cd $HOME/release $ ldd bin/vim $ mkdir lib $ cp /lib64/libtinfo.so.6 lib/
  11. 11. Vim release release bin lib vim libtinfo.so.6
  12. 12. Vim script Hello World
  13. 13. Vim script Hello World :echo “Hello World” :exit …
  14. 14. Vim script shebang #!bin/vim -u :echo “Hello World” :exit $ ./hello-world Hello World $
  15. 15. Vim script
  16. 16. :let api = $AWS_LAMBDA_RUNTIME_API
  17. 17. :let event_url = “http://” . api . “/2018-06-10/runtime/ invocation/next”
  18. 18. :let event = system(“curl ” . event_url)
  19. 19. :let file = system(“mktemp”)[:-2] :let headers = readfile(file)
  20. 20. for/while :for header in headers : if header =~ “Lambda-Runtime-Aws-Request-Id” : let id = header : endif :endfor
  21. 21. release/bootstrap release bootstrap bin lib vim libtinfo.so.6
  22. 22. release bootstrap bin lib vim libtinfo.so.6 vim.zip
  23. 23. aws lambda create-function --function-name vim --runtime provided --role --handler foobar --zip-file fileb://vim.zip
  24. 24. Vim lambda • • Vim AWS Lambda • Vim script Lambda

×