summaryrefslogtreecommitdiff
path: root/vim.nix
blob: dbb1a9cfcd007466b8845f91d6f17ce5dde1a3b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  enable = true;
  plugins = [
    "colors-solarized"
      "fugitive"
  ];
  settings = {
    ignorecase = true;
    expandtab = true;
    history = 1000;
    tabstop = 4;
  };
  extraConfig = ''
    " Auto-switch theme
    let hour = strftime("%H")
    if 6 <= hour && hour < 18
      set background=light
    else
      set background=dark
        endif
        colorscheme solarized
        filetype plugin indent on
        set cuc cul        " Crosshair
        set cc=80          " 80 column lines
        set linebreak      " Break lines at word (requires Wrap lines)
        set showbreak=     " Wrap-broken line prefix
        set textwidth=80   " Line wrap (number of cols)
        set showmatch      " Highlight matching brace
        set visualbell     " Use visual bell (no beeping)
        set hlsearch       " Highlight all search results
        set smartcase      " Enable smart-case search
        set incsearch      " Searches for strings incrementally
        ret autoindent     " Auto-indent new lines
        set shiftwidth=4   " Number of auto-indent spaces
        set smartindent    " Enable smart-indent
        set smarttab       " Enable smart-tabs
        set ruler          " Show row and column ruler information
        set backspace=indent,eol,start " Backspace behaviour
        imap fd <Esc>
        set wildmenu       " cool menu effect
        set mouse=a
        '';
}