This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lua require("telescope").setup({ | |
\ defaults = { | |
\ path_display={'smart'}, | |
\ preview=false, | |
\ border=false, | |
\ layout_config={ | |
\ prompt_position='bottom', | |
\ }, | |
\ initial_mode='normal', | |
\ sorting_strategy='ascending', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -n "${NVIM_LISTEN_ADDRESS}" ]]; then | |
alias vim='nvr -l -c "wincmd p | exit"' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" this script needs the following plugin that change Singularize <-> Pluralize | |
" NeoBundle 'kyohsuke/sinplu.vim' | |
" Entity <-> Table for cakePHP | |
command! -bang ChangeModel call ToggleModel() | |
function! ChangeModel() abort | |
let table_path = expand("%:p:h") | |
let table_file = expand("%:t:r") | |
if table_path =~# 'Table$' | |
call s:to_entity() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" fzf git grep | |
command! -bang -nargs=+ Gitgrep call s:fzf_git_grep('<args>') | |
function! s:fzf_git_grep(args) abort | |
let dir = s:get_git_base_path(expand("%:p:h")) | |
if dir == -1 | |
echo 'file not found .git' | |
return | |
endif | |
call fzf#run({ | |
\ 'source': 'git grep -n -I -i ' . a:args, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" fzf git grep | |
command! -bang -nargs=+ Gitgrep call fzf#run({ | |
\ 'source': 'git grep -n -I -i <args>', | |
\ 'sink': function('s:line_handler'), | |
\ 'dir': s:get_git_base_path(expand("%:p:h")), | |
\ 'up': '~40%', | |
\ 'options': '+m' | |
\ }) | |
" .gitディレクトリがあるパスを取得する |