-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
142 lines (124 loc) · 3.71 KB
/
.ideavimrc
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
"文字コード設定" "set fenc=utf-16
let mapleader = "\<Space>"
set fenc=utf-8
set encoding=utf-8
set relativenumber
scriptencoding=utf-8 "set nobackup
set noswapfile
set autoread
"コマンド表示
set showcmd
set clipboard=unnamed,autoselect
"ステータスラインを表示
set laststatus=2
"バックスペースの有効化
set backspace=indent,eol,start
set list
set list listchars=tab:>-
"mouse on
set mouse=a
"swpfile
syntax on
colorscheme molokai
"colorscheme industry
hi Comment ctermfg=yellow
hi MatchParen ctermbg = 1
"display"
"行番号表示
set number
"カーソル行の背景色を変化
set cursorline
"オートインデント
set smartindent
set wildmode=list:longest
"括弧入力時の補完
set showmatch
"編集中のファイル名表示
set title
set guioptions+=a
"Status line
"tab"
set tabstop=4
set shiftwidth=4
"search"
set ignorecase
set smartcase
set incsearch
set hlsearch
"command
set wildmenu
"==================================================================================
"keymap"
inoremap <silent> jj <ESC>
map = ^
map -- :q!<CR>
map ss :split<CR>
map vs :vsplit<CR>
nnoremap <F3> :noh<CR>
nnoremap <F6> :e!<CR>
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-h> <C-w>h
map <C-l> <C-w>l
map <F7> <C-w>H
map <F8> <C-w>J
map <F9> <C-w>K
map <F10> <C-w>L
nnoremap tn :tabnew<CR>
nnoremap mm gt
nnoremap nn gT
nnoremap \ $
set easymotion
map <leader>w <Plug>(easymotion-bd-w) " word単位移動
map <leader>s <Plug>(easymotion-bd-f2) " 検索移動
map <leader>l <Plug>(easymotion-bd-jk) " 行移動
" #function is_exists() { type "$1" >/dev/null 2>&1; return $?;}
" #function is_osx() { [[ $OSTYPE == darwin* ]]; }
" #function is_screen_running() { [ ! -z "$STY" ]; }
" #function is_tmux_running() { [ ! -z "$TMUX" ]; }
" #function is_screen_or_tmux_running() { is_screen_running || is_tmux_runnning; }
" #function shell_has_started_interactively() { [ ! -z "$PS1" ]; }
" #function is_ssh_running() { [ ! -z "$SSH_CONECTION" ]; }
" #
" #function tmux_automatically_attach_session()
" #{
" # if is_screen_or_tmux_running; then
" # ! is_exists 'tmux' && return 1
" # else
" # if shell_has_started_interactively && ! is_ssh_running; then
" # if ! is_exists 'tmux'; then
" # echo 'Error: tmux command not found' 2>&1
" # return 1
" # fi
" #
" # if tmux has-session >/dev/null 2>&1 && tmux list-sessions | grep -qE '.*]$'; then
" # # detached session exists
" # tmux list-sessions
" # echo -n "Tmux: attach? (y/N/num) "
" # read
" # if [[ "$REPLY" =~ ^[Yy]$ ]] || [[ "$REPLY" == '' ]]; then
" # tmux attach-session
" # if [ $? -eq 0 ]; then
" # echo "$(tmux -V) attached session"
" # return 0
" # fi
" # elif [[ "$REPLY" =~ ^[0-9]+$ ]]; then
" # tmux attach -t "$REPLY"
" # if [ $? -eq 0 ]; then
" # echo "$(tmux -V) attached session"
" # return 0
" # fi
" # fi
" # fi
" #
" # if is_osx && is_exists 'reattach-to-user-namespace'; then
" # # on OS X force tmux's default command
" # # to spawn a shell in the user's namespace
" # tmux_config=$(cat $HOME/.tmux.conf <(echo 'set-option -g default-command "reattach-to-user-namespace -l $SHELL"'))
" # tmux -f <(echo "$tmux_config") new-session && echo "$(tmux -V) created new session supported OS X"
" # else
" # tmux new-session && echo "tmux created new session"
" # fi
" # fi
" # fi
" #}