Skip to content

Commit

Permalink
[zsh][nvim]
Browse files Browse the repository at this point in the history
  zsh: add history settings
  nvim: disable mouse
  • Loading branch information
tinunkai committed Jul 7, 2023
1 parent b630686 commit 567b880
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vim.api.nvim_set_option('termguicolors', true)
vim.api.nvim_set_option('cursorcolumn', true)
vim.api.nvim_set_option('cursorline', true)

vim.api.nvim_set_option('mouse', '')
vim.api.nvim_set_option('tabstop', 4)
vim.api.nvim_set_option('shiftwidth', 4)
vim.api.nvim_set_option('expandtab', true)
Expand All @@ -28,6 +29,7 @@ nnoremap <Leader>p <cmd>Telescope find_files<cr>
nnoremap zi :set fdm=syntax<CR>
nnoremap zp :set fdm=indent<CR>
nnoremap <C-c> :wa<CR>:sp<CR><C-W>j:terminal<CR>i make<CR>
nnoremap <C-l> :e!<CR>
nnoremap <C-j> :tabn<CR>
nnoremap <C-k> :tabp<CR>
inoremap <C-o> <Esc>
Expand Down
9 changes: 6 additions & 3 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ alias matrix='cmatrix -ab -u 3'
alias vm='vmstat -t -S M 1'
alias luaf='lua-format --indent-width=2 -i'

export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=100000
export SAVEHIST=$HISTSIZE
export KEYTIMEOUT=1
export EDITOR='vi'
export VISUAL='vi'
Expand All @@ -55,9 +58,9 @@ bindkey -M emacs '^V' edit-command-line

wttr()
{
local request="wttr.in/${1-kashiwara}"
request+='?qAF&lang=zh'
[ "$COLUMNS" -lt 125 ] && request+='&n'
local request="wttr.in/${1}"
# request+='?qAF&lang=zh'
# [ "$COLUMNS" -lt 125 ] && request+='&n'
curl --compressed "$request"
}

Expand Down

0 comments on commit 567b880

Please sign in to comment.