Skip to content

Instantly share code, notes, and snippets.

@FanchenBao
Last active November 27, 2023 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FanchenBao/1ef63384a805270202c3638c41c2c85e to your computer and use it in GitHub Desktop.
Save FanchenBao/1ef63384a805270202c3638c41c2c85e to your computer and use it in GitHub Desktop.
Vim Setup
" Set absolute line number for the current line and the rest is relative number
set number
set relativenumber
" Enable monokai theme
syntax enable
set background=dark
colorscheme monokai
" I do not remember what these do
vnoremap < <gv
vnoremap > >gv
set shiftwidth=0
set expandtab
" Set autoindent
set autoindent
" Add command "set tabstop=4" when you want to have tab=4 spaces.
" Page up and down and then center the cursor
nnoremap <C-d> <C-d>M
nnoremap <C-u> <C-u>M
" Force the vertical bar to be skinny in insert mode, and fat in normal mode
if $TERM_PROGRAM =~ "iTerm"
let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode
let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode
endif
" Use jj to escape
inoremap jj <Esc>
" Enable highlight of searched string and clear the last used search pattern
" see https://stackoverflow.com/a/657484/9723036
set hlsearch
command C let @/=""
[
{
"keys": [
"j",
"j"
],
"command": "exit_insert_mode",
"context": [
{
"key": "setting.command_mode",
"operand": false
},
{
"key": "setting.is_widget",
"operand": false
}
]
}
]
{
"font_size": 22,
"ignored_packages": [
],
"vintage_start_in_command_mode": true,
"rulers":
[
80
],
"translate_tabs_to_spaces": true,
"theme": "Monokai Classic.sublime-theme",
"color_scheme": "Monokai Classic.sublime-color-scheme",
"save_on_focus_lost": true,
"relative_line_numbers": true
}
@FanchenBao
Copy link
Author

Read the doc to set up Vim monokai theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment