summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-08-21 09:41:04 -0700
committerBen Sima <ben@bsima.me>2018-08-21 09:41:04 -0700
commitf096799004a8549f61dcc1b289d8aa79ee7ea6bd (patch)
tree5425767ff8b91e9dc6c2be4d0f6377a7f4d005a2
parent17f15da19dd9da4b0990071a63f75e27326d8956 (diff)
Finally got vim and tmux colors working well together
-rw-r--r--tmux2
-rw-r--r--vim.nix36
2 files changed, 12 insertions, 26 deletions
diff --git a/tmux b/tmux
index ff8fb5a..2384843 100644
--- a/tmux
+++ b/tmux
@@ -8,7 +8,7 @@ set -g base-index 1
set-window-option -g automatic-rename on
set-option -g set-titles on
-set -g default-terminal xterm-256color
+set -g default-terminal "screen-256color"
set -g status-keys vi
set -g history-limit 10000
diff --git a/vim.nix b/vim.nix
index 67566d9..356e901 100644
--- a/vim.nix
+++ b/vim.nix
@@ -1,22 +1,9 @@
{ pkgs, vimUtils, fetchFromGitHub}:
-let
- vim-sexp = vimUtils.buildVimPluginFrom2Nix {
- name = "elm.vim-2017-07-09";
- src = fetchFromGitHub {
- owner = "guns";
- repo = "vim-sexp";
- rev = "12292941903d9ac8151513189d2007e1ccfc95f0";
- sha256 = "1mfqbmrbqgnsc34pmcsrc0c5zvgxhhnw4hx4g5wbssfk1ddyx6y0";
- };
- dependencies = [];
- };
-in
{
enable = true;
plugins = [
"sensible"
- "colors-solarized"
"ctrlp"
"fugitive"
"editorconfig-vim"
@@ -30,7 +17,6 @@ in
tabstop = 4;
};
extraConfig = ''
- set cuc cul " Crosshair
set cc=80 " 80 column lines
set linebreak " Break lines at word (requires Wrap lines)
set textwidth=80 " Line wrap (number of cols)
@@ -41,24 +27,24 @@ in
set shiftwidth=4 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set laststatus=1 " No status line
+
" Mappings
imap fd <Esc>
nnoremap ,s :r ~/sig.txt<cr>
- " UI stuf
+
+ " Easily find cursor with crosshair (\c)
+ :hi CursorLine cterm=NONE term=reverse ctermbg=7 guibg=Grey90
+ :hi CursorColumn cterm=NONE term=reverse ctermbg=7 guibg=Grey90
+ :nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
+
+ " File browser
let g:netrw_banner=0 " Disable file browser banner
let g:netrw_liststyle=3 " Tree view
- set mouse=a
+
"" CTAGS shortcuts
- "" open definition in a new tab:
+ " open definition in a new tab:
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
- "" open definition in a vertical split:
+ " open definition in a vertical split:
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
- "" https://github.com/lifepillar/vim-solarized8#troubleshooting
- let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
- let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
- set termguicolors
- set background=light
- let g:solarized_termcolors=256
- colorscheme solarized8
'';
}