]> git.zndr.dk Git - dotfiles.git/commitdiff
Add Ctrl-P to vim
authorJannik ZANDER <jzander@grundfos.com>
Wed, 4 Jul 2018 18:12:55 +0000 (20:12 +0200)
committerJannik ZANDER <jzander@grundfos.com>
Wed, 4 Jul 2018 18:12:55 +0000 (20:12 +0200)
.bashrc
.gitmodules
.profile
.vim/pack/plugins/start/ctrlp.vim [new submodule]
.vim/vimrc

diff --git a/.bashrc b/.bashrc
index 3b9326dbe66da66293e0556bdf4f6258f55cc407..65bbcf5b9547a05c5c6c4903208c0cb5a1b0c958 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -1,5 +1,10 @@
 # .bashrc is for configuring the interactive Bash usage, like Bash aliases, setting favorite editor, setting Bash prompt, etc.
 
+# If not running interactively, don't do anything
+[[ -z "$PS1" ]] && return
+
+cd ~
+
 # Set favorites
 export SHELL='bash'
 export EDITOR='vim'
@@ -7,23 +12,11 @@ export VISUAL='vim'
 export PAGER='less -eFRX'
 export MANPAGER="less -eFRX"
 
-# If not running interactively, don't do anything
-[[ -z "$PS1" ]] && return
-
 # Set prompt
 if [[ -z "$MSYS2_PS1" ]]; then
   PS1='${debian_chroot:+($debian_chroot)}'  # debian
 else
   PS1='\[\033]0;$PWD\007\]'                 # terminal title in msys2
-  cd ~
-  GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
-  COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
-  COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
-  COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
-  if test -f "$COMPLETION_PATH/git-prompt.sh"; then
-    . "$COMPLETION_PATH/git-completion.bash"
-    . "$COMPLETION_PATH/git-prompt.sh"
-  fi
 fi
 
 PS1="$PS1"'\[\033[01;32m\]'     # change color
index 77b57308da7b92b84f817a6fea7b2813e4084a77..582054d87640ff90b417fa36e287009a267d3590 100644 (file)
@@ -31,3 +31,6 @@
 [submodule ".vim/pack/plugins/start/incsearch.vim"]
        path = .vim/pack/plugins/start/incsearch.vim
        url = https://github.com/haya14busa/incsearch.vim.git
+[submodule ".vim/pack/plugins/start/ctrlp.vim"]
+       path = .vim/pack/plugins/start/ctrlp.vim
+       url = https://github.com/ctrlpvim/ctrlp.vim.git
index 97d7b1757468089f68ad1d3f708c855c1c1d30c2..cefad05fab6403e1d47c45dcfbbe48f37da5bc42 100644 (file)
--- a/.profile
+++ b/.profile
@@ -21,8 +21,8 @@ fi
 #export XDG_DATA_DIRS=/usr/local/share/:/usr/share/
 export QT_STYLE_OVERRIDE=adwaita-dark
 
-export USERNAME=$LOGNAME
 export HOSTNAME=`hostname`
+
 echo Welcome $USERNAME @ $HOSTNAME !
 
 ################################# DEBIAN LOCAL SETTINGS ##### TO BE MOVED ####
diff --git a/.vim/pack/plugins/start/ctrlp.vim b/.vim/pack/plugins/start/ctrlp.vim
new file mode 160000 (submodule)
index 0000000..e66b5b5
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit e66b5b50e5c539354813e2ecac6fb75a2121e29e
index 94089b237fe94c3bb095b69f6b88e59b5889daeb..946aa54b43f6550a746a7d57e8d06ca31658696a 100644 (file)
@@ -68,16 +68,17 @@ set shell=/bin/bash
 set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin
 
 "set makeprg=cmake\ --build\ .
+set makeprg=msbuild
 " Visual studio 2013
-"set errorformat=\ %#%f(%l):\ %m
+set errorformat=\ %#%f(%l):\ %m
 " Visual studio 2008
 "set errorformat=%.%#>\ %#%f(%l)\ :\ %m
 "
 " IAR compiler
-if executable('vim-iarbuild.cmd')
-  set makeprg=vim-iarbuild.cmd
-  set errorformat=%f(%l)\ :\ %m
-endif
+"if executable('vim-iarbuild.cmd')
+"  set makeprg=vim-iarbuild.cmd
+"  set errorformat=%f(%l)\ :\ %m
+"endif
 
 if executable('ag')
   set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
@@ -239,6 +240,11 @@ if has("cscope")
   map <c-_> :cstag <c-r>=expand("<cword>")<cr><cr>
 endif
 
+" Ctrl-P
+let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
+let g:ctrlp_map = '<c-p>'
+let g:ctrlp_cmd = 'CtrlP'
+
 " Maps Ctrl-[h,j,k,l,+,-] to windows split navigations and resizing
 nnoremap <C-H>    <C-W><C-H>
 nnoremap <C-J>    <C-W><C-J>