#!/bin/sh
-SESSION="dev-c"
-
while getopts "p:" opt; do
case $opt in
p) PRJ_DIR="${OPTARG}";;
[[ ! -f "${l_ycm_conf}" ]] && cp "${dot_ycm_conf}" "${l_ycm_conf}"
[[ ! -f "${l_header_template}" ]] && cp "${dot_header_template}" "${l_header_template}"
+SESSION="dev-c"
+IDE_WND_NAME="ide"
+DEBUG_WND_NAME="debug"
tmux_dev_c_conf="${DOT_FILES_TMUX}/.tmux_dev_c.conf"
-tmux source "${tmux_dev_c_conf}" \; new-session -d -s "${SESSION}" -n ide
+tmux source "${tmux_dev_c_conf}" \; new-session -d -s "${SESSION}" -n "${IDE_WND_NAME}"
-tmux splitw -v -p 7
+tmux splitw -h -p 50
tmux selectp -t 2
tmux send-keys "cd ${PRJ_DIR}" Enter
tmux send-keys "source ${PRJ_INIT_FILE}" Enter
tmux selectp -t 1
tmux send-keys "cd ${PRJ_DIR}" Enter
tmux send-keys "source ${PRJ_INIT_FILE}" Enter
+tmux send-keys "clear" Enter
tmux send-keys "vi -u ${l_vimrc} ${PRJ_DIR}" Enter
+tmux new-window -n "${DEBUG_WND_NAME}"
+tmux send-keys "cd ${PRJ_DIR}" Enter
+tmux send-keys "source ${PRJ_INIT_FILE}" Enter
+tmux send-keys "clear" Enter
+
+tmux select-window -t 1
+
tmux attach-session -t "${SESSION}"
[[ -d "${OUT_DIR}" ]] && make clean
}
+vpe() {
+ vi -u "${CFG_DIR}/.vimrc" "${PRJ_DIR}"
+}
+
+lgdb() {
+ tail -f "${PRJ_DIR}/gdb.txt"
+}
+
+srcp() {
+ source "${CFG_DIR}/.initrc"
+}
+
# Following project specific variables should be added by tmux session start script
map <leader>> :tabn<CR>
map <leader>< :tabp<CR>
+" Buffers bindings
+ map <leader>x :bd %<CR>
+
" Nerd tree
map <leader>n :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif