Install papercolor in vim Installwhen using VundlePlugin 'NLKNguyen/papercolor-theme' Then add it to ~/.vimrcset t_Co=256 " This is may or may not needed. set background=light # if you want to use dark version # set background=dark colorscheme PaperColor Done!! Easy usage! tools/vim 2018.02.23
Install and using vim plug I used Vundle when using vim, but I found bit more great plugin installer - Plug.Easy to install.When using vim,curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim When using neovimcurl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim Usagehere’s m.. tools/vim 2018.02.22
Adjust cursor speed in mac (os x) I usally use terminal in mac. Mac default cursor speed is little bit slow so I changed cursor speed faster.There’s two way to adjust cursor speed in mac.1. Change in mac settingsChange repeat delay time in mac system preference.System Preference => Keyboard => Repeat Delay Time 2. Change in termianlOpen terminal app and enter this commanddefaults write NSGlobalDomain KeyRepeat -int 0 tools/mac 2018.02.18
Vim: searching include slash In vim, you can easily search words by using / command.But if you enter slash in search it doesn’t match because / has special function in vim search.So if you want to search with slash, you simply add \ before slash.If you want to search the url including slash example.com/user/, use like this/example.com\/user\/ tools/vim 2018.02.14
mac os X, tmux 2.6(신버전)에서 yank, paste tmux를 새로운 버전으로 업데이트 하고 나서부터 vim yank, paste 키가 먹히지 않아서 찾아보던 중 업데이트 이후 key bind 명령어가 바뀐 것을 발견하고 수정하였다.혹시 비슷한 문제를 겪는 사람이 있을 것 같아 공유한다.이전 방식bind-key -t vi-edit Up history-up bind-key -t vi-edit Down history-down unbind-key -t vi-copy Space ; bind-key -t vi-copy v begin-selection unbind-key -t vi-copy Enter ; bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" unbind-key -t vi-copy C.. tools/mac 2018.02.09
Mac os X : termianl에서 자동으로 zsh 열기 처음에 zsh를 세팅 해도, 터미널을 열면 자동으로 bash가 실행된다.다음 명령어를 실행시키면 그 다음부터 터미널을 열었을 때 자동으로 zsh가 실행된다.sudo sh -c “echo ‘/usr/local/bin/zsh’ >> /etc/shells” chsh -s /usr/local/bin/zsh tools/linux 2018.02.08
리눅스 파일 내용 검색하기 터미널에서 해당 파일 안의 내용을 검색하는 방법을 찾아서 까먹지 않기 위해 공유한다. 부분에 원하는 검색 내용을 넣으면 된다.grep -rnw `./` -e tools/linux 2018.02.05
맥(OSX )에서 ctags 설치 및 vim ctags 사용 기본적으로 mac에는ctags가 깔려 있다. ctags --help 명령어를 쳐보면 확인이 가능하다. 그런데 ctags -R과 같은 기본적인 명령어를 실행시키면 illegal option -- R라는 오류가 나오는 것을 볼 수 있다.그래서 brew를 통해 ctags를 재설치해주어야 할 필요가 있다.brew install ctags 그리고 기존의 ctags 명령어를 brew를 통해 설치된 명령어로 대체한다. (~/.bashrc, ~/.zshrc 등의 파일에 추가)alias ctags="`brew --prefix`/bin/ctags" 그럼 이후부터 기본 ctags 명령어가 brew로 설치한 ctags를 실행시킨다.ctags 생성직접 원하는 파일들만 tags 파일로 만들 수 있지만, 번거롭기 때문에 -R 명령.. tools/vim 2018.02.04
Vim 에서 quote, unquote 하기 (따옴표) 가장 쉬운 방법은 surround.vim 플러그인을 사용하는 것이다. 깃허브에 사용법이 나와있고 추후에 사용법을 정리 할 예정.하지만 플러그인을 사용하지 않고 vim스러운 방법도 있기에 공유한다.Quoting (‘‘를 이용하여 word 감싸기)ciw'Ctrl+r"' 각각의 명령어를 설명하자면ciw: 커서가 있는 단어를 대체 (change)': 작은 따움표 하나추가Ctrl+r": Ctrl+r은 입력 모드에서 레지스터에 있는 것을 붙여넣어준다. " 레지스터는 최근에 복사/지운 레지스터기 때문에 Ctrl+r"은 방금 ciw 명령어로 지운 단어를 붙여넣어준다.': 뒤에 따옴표 추가. (만약 따옴표를 자동으로 만들어 주는 플러그인을 사용한다면 따로 쓰지 않아도 된다.)위의 명령어를 등록해 놓고 써도 된다. (사실.. tools/vim 2018.02.03
리눅스 방화벽 설정 - iptables iptables란?“iptables는 시스템 관리자가 리눅스 커널 방화벽(다른 넷필터 모듈로 구현됨)이 제공하는 테이블들과 그것을 저장하는 체인, 규칙들을 구성할 수 있게 해주는 사용자 공간 응용 프로그램이다.” - 위키백과 iptables새로 서버를 구축할 때 iptables 설정으로 여러 번 골머리를 앓다가 한 번 정리를 해 두면 두고두고 좋을 것 같아서 정리 해 본다.iptables에 대한 기초 설명은 잘 정리된 곳에서 참조했다. (참고 블로그)1) 테이블(tables)우선 iptables에는 테이블이라는 광범위한 범주가 있는데, 이 테이블은 filter, nat, mangle, raw 같은 4개의 테이블로 구성되며, 이중에서 우리에게 필요한 것은 필터링 규칙을 세우는 filter 테이블이다.2) .. tools/linux 2018.02.01