Skip to content

Instantly share code, notes, and snippets.

View lemonjp's full-sized avatar
😀

Moritsugu Wada lemonjp

😀
View GitHub Profile
@lemonjp
lemonjp / grep_menuitem.vim
Created September 23, 2014 00:57
grep for nerdtree
"shove this in ~/.vim/nerdtree_plugin/grep_menuitem.vim
"
"A really rough integration of :grep with nerdtree. Adds a 'g' menu item that
"prompts the user for a search pattern to use with :grep. :grep is run on the
"selected dir (using the parent if a file is selected)
"
" Originally written by scrooloose
" (http://gist.github.com/205807)
if exists("g:loaded_nerdtree_grep_menuitem")
@lemonjp
lemonjp / ubuntu_statup.sh
Last active August 29, 2015 14:12
ubuntu startup shell script
#!/bin/bash
echo "set up locale"
sudo locale-gen ja_JP.UTF-8
echo "make bash pronpt shorter"
mv ~/.bashrc ~/.bashrc.dist
sed -e 's/\\u@\\h:\\w/\\u@\\h:\\W/g' ~/.bashrc.dist > ~/.bashrc
echo "dotfile install"
git clone https://github.com/lemonjp/dotfiles.git
sh -x ./dotfiles/setup.sh
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
#!/bin/bash
sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-sqlite php5-curl php5-intl php5-cli php-apc php5-xdebug acl git
## configuration apache for vagrant
# sudo sed -i 's#/var/www#/vagrant#g' /etc/apache2/sites-available/default
# sudo adduser www-data vagrant
## config php apache DEV
@lemonjp
lemonjp / sublime-keybindings
Last active October 13, 2016 11:44
sublime text user setting
[
{"keys": ["ctrl+u"], "command": "scroll_lines", "args": {"amount": 20.0}, "context": [{ "key": "setting.command_mode" }]},
{"keys": ["ctrl+d"], "command": "scroll_lines", "args": {"amount": -20.0}, "context": [{"key": "setting.command_mode"}]},
{"keys": ["ctrl+e"], "command": "toggle_side_bar" },
]
@lemonjp
lemonjp / setup_vim_centos.sh
Created June 15, 2015 02:56
install vim 7.4 for centos 6.5
yum install -y mercurial ncurses-devel
cd /usr/local/src
hg clone https://vim.googlecode.com/hg/ vim
cd /usr/local/src/vim
hg update v7-4-020
./configure --enable-multibyte --with-features=huge --disable-selinux --prefix=/usr/local
make
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz/download
# wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@lemonjp
lemonjp / vim74_for_centos.md
Last active June 25, 2016 08:06
Vim7.4 for Centos6

Vim 7.4 Install for CentOS

check whether vim support on python or not.

:py import sys; print(sys.version_info)

os level support python check

$ python --version Python 2.6.6

$ uname -a

@lemonjp
lemonjp / YouCompleteMe.md
Last active April 15, 2017 18:35
Install YouCompleteMe.vim

YouCompleteMe.vim Installation

Install YouCompleteMe on Ubuntu 16.04

sudo apt install vim-nox

sudo apt-get install build-essential cmake

sudo apt-get install python-dev python3-dev
@lemonjp
lemonjp / Ubuntu-Setup.md
Last active April 18, 2018 04:06
Ubuntu 16.04 Setup

Ubuntu 16.04 Setup

Customize bash prompt

eazy prompt

# get current branch in git repo
function parse_git_branch() {
	BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`