zsh+vim配置方案

0

分享一下我的MacOS上terminal配置方案:

  • iTerm2

    • color_preset="ayu"
  • oh-my-zsh

    • zsh_theme="agnoster"
      具体安装配置github上都有,效果如图: 如果不想显示用户名,可在~/.zshrc中加上一行DEFAULT_USER=whoami“

0x02

我的Ubuntu上terminal配置方案:

  • terminator

    • custom config
  • oh-my-zsh

    • zsh_theme="bureau"
      效果图:

0x03

zsh主题安装请前往https://github.com/robbyrussell/oh-my-zsh。 iTerm2和terminator主题安装请前往https://github.com/mbadolato/iTerm2-Color-Schemes

0x04

贴出我的vim配置文件.vimrc,路径为~/.vimrc,需要先安装https://github.com/sheerun/vim-polyglot

execute pathogen#infect()
"语法高亮
syntax on
"侦测文件类型
filetype on
"载入文件类型插件
filetype plugin on
"为不同文件类型使用不同缩进
filetype indent on
"tab长度为4
set tabstop=4
"退格一次删4个空格
set softtabstop=4
"所有模式启用鼠标
set mouse=a
"打开自动缩进
set autoindent
"使用C/C++的缩进方式
set cindent
"为C程序提供自动缩进
set smartindent
"自动缩进长度为4个空格
set shiftwidth=4
"一行最多100字符自动换行
set textwidth=100
"显示行号
set number
"右下角显示光标位置
set ruler
"总是显示状态栏
set laststatus=2
"自定义状态栏
"set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
"               | | | | |  |   |      |  |     |    |
"               | | | | |  |   |      |  |     |    +-- 当前列数
"               | | | | |  |   |      |  |     +-- 当前行数
"               | | | | |  |   |      |  +-- 当前光标位置百分比
"               | | | | |  |   |      +-- 使用的语法高亮器
"               | | | | |  |   +-- 文件格式
"               | | | | |  +-- 文件总行数
"               | | | | +-- 预览标志
"               | | | +-- 帮助文件标志
"               | | +-- 只读标志
"               | +-- 已修改标志
"               +-- 当前文件绝对路径
set statusline=%F%m[Lines:%L][Current:(%l,%v)]
"强调匹配的括号
set showmatch
"光标短暂跳转到匹配括号的时间,单位是十分之一秒
set matchtime=2
"自动切换到当前文件所在目录
set autochdir
"搜索时忽略大小写
set ignorecase
"随着键入即时搜索
set incsearch
"键入一个或以上大写字母时仍大小写敏感
set smartcase
"insert下f2切换粘贴模式
set pastetoggle=<f2>
"针对python
autocmd FileType python setlocal expandtab sta shiftwidth=4 sts=4

vim效果图:

0x05

terminator的config路径为~/.config/terminator/config,我的参考了https://github.com/joerx/base16-terminator

[global_config]tab_position = bottom
  title_hide_sizetext = True
  title_transmit_bg_color = "#3686d9"
  window_state = maximise
[keybindings][layouts][[default]]
    [[[child1]]]
      parent = window0
      type = Terminal
    [[[window0]]]
      parent = ""
      type = Window
[plugins][profiles][[default]]
    background_color = "#2d2d2d"
    background_darkness = 0.92
    background_image = None
    background_type = transparent
    cursor_color = "#d3d0c8"
    font = Monospace 12
    foreground_color = "#d3d0c8"
    icon_bell = False
    palette = "#2d2d2d:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#d3d0c8:
#747369:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#f2f0ec"
    scrollbar_position = hidden
    split_to_group = True
    use_system_font = False
  [[ayu]]
    background_color = "#0f1419"
    background_image = None
    cursor_color = "#f29718"
    foreground_color = "#e6e1cf"
    palette = "#000000:#ff3333:#b8cc52:#e7c547:#36a3d9:#f07178:#95e6cb:#ffffff:
#323232:#ff6565:#eafe84:#fff779:#68d5ff:#ffa3aa:#c7fffd:#ffffff"

Leave A Reply

苏ICP备16066660号-1

苏公网安备 32011502010432号