Skip to content

Commit deadd5d

Browse files
shuraneEhtesh Choudhury
authored and
Ehtesh Choudhury
committed
get a consistent theme going, add 2 FZF search options in vim
1 parent b06944d commit deadd5d

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

.bat.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
66
# for a list of all available themes
7-
#--theme="TwoDark"
7+
--theme="Monokai Extended"
88

99
# Enable this to use italic text on the terminal. This is not supported on all
1010
# terminal emulators (like tmux, by default):
@@ -21,7 +21,7 @@
2121
#--map-syntax "*.ino:C++"
2222
#--map-syntax ".ignore:Git Ignore"
2323
--map-syntax='*.conf:Apache Conf'
24-
--paging=never
24+
#--paging=never
2525
--style=plain
2626
#--number
2727

.readable.vimrc

+33-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endif
4242

4343
call plug#begin('~/.vim/plugged')
4444
Plug 'junegunn/fzf'
45-
Plug 'ziglang/zig.vim'
45+
"Plug 'ziglang/zig.vim'
4646
Plug 'tpope/vim-surround'
4747
Plug 'tpope/vim-eunuch' "useful for :Rename, :Move
4848
Plug 'scrooloose/nerdcommenter'
@@ -51,12 +51,14 @@ call plug#begin('~/.vim/plugged')
5151
Plug 'lambdalisue/suda.vim'
5252

5353
"colorschemes
54-
Plug 'rktjmp/lush.nvim', {'branch': 'main'}
55-
Plug 'ViViDboarder/wombat.nvim', {'branch': 'main'}
5654
Plug 'EvitanRelta/vim-colorschemes'
55+
"Plug 'navarasu/onedark.nvim'
5756
Plug 'sainnhe/sonokai'
57+
Plug 'rktjmp/lush.nvim', {'branch': 'main'}
58+
Plug 'ViViDboarder/wombat.nvim', {'branch': 'main'}
5859
Plug 'Mofiqul/vscode.nvim', {'branch': 'main'}
5960
Plug 'EdenEast/nightfox.nvim', {'branch': 'main'}
61+
Plug 'tiagovla/tokyodark.nvim'
6062

6163
"Plug 'mhinz/vim-grepper'
6264
if has('nvim')
@@ -70,7 +72,33 @@ call plug#begin('~/.vim/plugged')
7072
endif
7173
call plug#end()
7274

73-
nnoremap <C-p> :FZF<CR>
75+
" https://cj.rs/blog/git-ls-files-is-faster-than-fd-and-find/
76+
" https://github.com/junegunn/fzf/blob/master/README-VIM.md
77+
" https://github.com/junegunn/fzf/issues/31
78+
function! FZFExecute()
79+
" Remove trailing new line to make it work with tmux splits
80+
let directory = substitute(system('git rev-parse --show-toplevel'), '\n$', '', '')
81+
if !v:shell_error
82+
call fzf#run({'sink': 'e', 'dir': directory, 'source': 'git ls-files -c --exclude-standard', 'window': { 'width': 0.9, 'height': 0.6 } })
83+
else
84+
FZF
85+
endif
86+
endfunction
87+
command! FZFExecute call FZFExecute()
88+
89+
function! FZFCWDExecute()
90+
" Remove trailing new line to make it work with tmux splits
91+
if !v:shell_error
92+
call fzf#run({'sink': 'e', 'dir': '.', 'window': { 'width': 0.9, 'height': 0.6 } })
93+
else
94+
FZF
95+
endif
96+
endfunction
97+
command! FZFCWDExecute call FZFCWDExecute()
98+
99+
let $FZF_DEFAULT_COMMAND = 'fd --type f --exclude .git'
100+
nnoremap <C-p> :FZFExecute<CR>
101+
nnoremap <C-.> :FZFCWDExecute<CR>
74102
75103
let g:vim_markdown_folding_disabled = 1
76104
let g:vim_markdown_new_list_item_indent = 0
@@ -97,6 +125,7 @@ require'lspconfig'.clangd.setup{}
97125

98126
-- https://github.com/nvim-treesitter/nvim-treesitter
99127
require'nvim-treesitter.configs'.setup {
128+
ensure_installed = { "java", "cpp", "python", "javascript", "bash" },
100129
highlight = {
101130
enable = true,
102131
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.

0 commit comments

Comments
 (0)