Compare commits
2 Commits
b71231d96f
...
1b6e7bb311
Author | SHA1 | Date | |
---|---|---|---|
|
1b6e7bb311 | ||
|
b280ce46ba |
@ -72,9 +72,9 @@
|
|||||||
"Plug 'Shougo/denite.nvim'
|
"Plug 'Shougo/denite.nvim'
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
Plug 'asolkar/vim-color-molokini'
|
Plug 'asolkar/vim-color-molokini'
|
||||||
Plug 'flrnprz/plastic.vim'
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides'
|
Plug 'nathanaelkane/vim-indent-guides'
|
||||||
Plug 'luochen1990/rainbow'
|
Plug 'luochen1990/rainbow'
|
||||||
|
Plug 'https://gitlab.devtools.intel.com/masolkar/vim-iosf.git' " intel
|
||||||
Plug 'vhda/verilog_systemverilog.vim'
|
Plug 'vhda/verilog_systemverilog.vim'
|
||||||
Plug 'nanotech/jellybeans.vim'
|
Plug 'nanotech/jellybeans.vim'
|
||||||
|
|
||||||
@ -96,7 +96,7 @@
|
|||||||
if has("mac")
|
if has("mac")
|
||||||
set guifont=Iosevka-Term:h16
|
set guifont=Iosevka-Term:h16
|
||||||
elseif has("win32")
|
elseif has("win32")
|
||||||
set guifont=Iosevka\ Term\ Regular\ 13
|
set guifont=Iosevka\ Term\ Regular\ 15
|
||||||
else
|
else
|
||||||
set guifont=Iosevka\ Term\ Regular\ 13.5
|
set guifont=Iosevka\ Term\ Regular\ 13.5
|
||||||
end
|
end
|
||||||
@ -132,9 +132,9 @@
|
|||||||
set colorcolumn=120
|
set colorcolumn=120
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:molokini_gui_italic = 0
|
"let g:molokini_gui_italic = 0
|
||||||
colorscheme molokini
|
colorscheme molokini
|
||||||
"colorscheme deus
|
|
||||||
set norelativenumber
|
set norelativenumber
|
||||||
set number
|
set number
|
||||||
|
|
||||||
@ -215,6 +215,10 @@
|
|||||||
|
|
||||||
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
|
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
|
||||||
|
|
||||||
|
let g:iosftrk_folddisable = 1 " intel
|
||||||
|
let g:iosfsbtrk_folddisable = 1 " intel
|
||||||
|
|
||||||
|
let g:fugitive_git_executable = '/usr/intel/bin/git' " intel
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Key bindings {{{
|
" Key bindings {{{
|
||||||
@ -279,6 +283,8 @@
|
|||||||
"
|
"
|
||||||
" File associations {{{
|
" File associations {{{
|
||||||
|
|
||||||
|
au! BufRead,BufNewFile *_iosf*_trk.out set filetype=iosftrk " intel
|
||||||
|
au! BufRead,BufNewFile *_iosfsb*_trk.out set filetype=iosfsbtrk " intel
|
||||||
au! BufRead,BufNewFile * RainbowToggleOn
|
au! BufRead,BufNewFile * RainbowToggleOn
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
224
nvim.init.lazy.lua
Normal file
224
nvim.init.lazy.lua
Normal file
@ -0,0 +1,224 @@
|
|||||||
|
-- Install Lazy package
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Lazy setup
|
||||||
|
require("lazy").setup({
|
||||||
|
-- Config
|
||||||
|
defaults = {
|
||||||
|
lazy = true
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Packages
|
||||||
|
"asolkar/vim-color-molokini",
|
||||||
|
"kyazdani42/nvim-web-devicons",
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
"preservim/nerdtree",
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
"mhinz/vim-signify",
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
"jiangmiao/auto-pairs",
|
||||||
|
"luochen1990/rainbow",
|
||||||
|
"tpope/vim-surround",
|
||||||
|
"nathanaelkane/vim-indent-guides",
|
||||||
|
"https://github.com/intel-sandbox/vim-iosf.git", -- intel
|
||||||
|
"https://github.com/intel-sandbox/vim-pcietrk", -- intel
|
||||||
|
"vhda/verilog_systemverilog.vim"
|
||||||
|
})
|
||||||
|
|
||||||
|
-- LuaLine
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = false,
|
||||||
|
theme = 'nightfly',
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
component_separators = { left = '', right = '' }
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
path = 2,
|
||||||
|
symbols = {
|
||||||
|
modified = ' ●', -- Text to show when the buffer is modified
|
||||||
|
alternate_file = ' ↻', -- Text to show to identify the alternate file
|
||||||
|
directory = ' ▶', -- Text to show when the buffer is a directory
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tabline = {
|
||||||
|
lualine_a = {
|
||||||
|
{
|
||||||
|
'buffers',
|
||||||
|
show_filename_only = true, -- Shows shortened relative path when set to false.
|
||||||
|
hide_filename_extension = false, -- Hide filename extension when set to true.
|
||||||
|
show_modified_status = true, -- Shows indicator when the buffer is modified.
|
||||||
|
|
||||||
|
mode = 4, -- 0: Shows buffer name
|
||||||
|
-- 1: Shows buffer index
|
||||||
|
-- 2: Shows buffer name + buffer index
|
||||||
|
-- 3: Shows buffer number
|
||||||
|
-- 4: Shows buffer name + buffer number
|
||||||
|
|
||||||
|
max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,
|
||||||
|
-- it can also be a function that returns
|
||||||
|
-- the value of `max_length` dynamically.
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
modified = ' ●', -- Text to show when the buffer is modified
|
||||||
|
alternate_file = ' ↻', -- Text to show to identify the alternate file
|
||||||
|
directory = ' ▶', -- Text to show when the buffer is a directory
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Gitsigns
|
||||||
|
-- See `:help gitsigns.txt`
|
||||||
|
require('gitsigns').setup {
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- [[ Setting options ]]
|
||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = true
|
||||||
|
|
||||||
|
-- Highlight problematic whitespace
|
||||||
|
vim.o.list = true
|
||||||
|
vim.opt.listchars = { tab = '▶ ', trail = '●', extends = '#', nbsp = '.' }
|
||||||
|
|
||||||
|
-- Whitespace/tab management
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.colorcolumn = '120'
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.wo.number = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.wrap = false
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case insensitive searching UNLESS /C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Set colorscheme
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
-- vim.cmd [[colorscheme molokini]]
|
||||||
|
vim.cmd.colorscheme('molokini')
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- Do not auto read file when in focus
|
||||||
|
vim.o.autoread = false
|
||||||
|
|
||||||
|
-- [[ Basic Keymaps ]]
|
||||||
|
-- Set <space> as the leader key
|
||||||
|
-- See `:help mapleader`
|
||||||
|
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||||
|
vim.g.mapleader = ','
|
||||||
|
vim.g.maplocalleader = ','
|
||||||
|
|
||||||
|
-- Keymaps for better default experience
|
||||||
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-z>', ':bn<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-x>', ':bp<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F5>', ':e<CR>', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F6>', '<C-W>w', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F18>', '<C-W>W', { noremap = 1 }) -- S-F6 (F18 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F7>', '<C-W>o', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F8>', '<C-W>v', { noremap = 1 })
|
||||||
|
vim.api.nvim_set_keymap('n', '<F20>', '<C-W>s', { noremap = 1 }) -- S-F8 (F20 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('n', '<F35>', ':confirm bd<CR>', { noremap = 1 }) -- C-F11 (F35 defined in ST's config.h)
|
||||||
|
vim.api.nvim_set_keymap('v', '<LeftRelease>','"*ygv', { noremap = 1 }) -- Copy selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<2-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy word selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<3-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy line selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<4-LeftRelease>','"*ygv', { noremap = 1 }) -- Copy column selection to clipboard
|
||||||
|
vim.api.nvim_set_keymap('v', '<c-r>', '"hy/<C-r>h<cr>', { noremap = 1 }) -- Search selected text
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-Space>', 'za', { noremap = 1 }) -- Toggle fold
|
||||||
|
vim.api.nvim_set_keymap('v', '<', '<gv', { noremap = 1 }) -- Preserve selection after left indent
|
||||||
|
vim.api.nvim_set_keymap('v', '>', '>gv', { noremap = 1 }) -- Preserve selection after right indent
|
||||||
|
vim.api.nvim_set_keymap('v', 'Q', 'gqa', { noremap = 1 }) -- Reflow visually highlighted lines with Q
|
||||||
|
vim.api.nvim_set_keymap('n', 'Q', 'gq', { noremap = 1 }) -- Reflow text
|
||||||
|
|
||||||
|
-- Insert time/date stamps
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>td', 'i<C-R>=strftime(\'%Y/%m/%d\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - [d]ate'
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>tt', 'i<C-R>=strftime(\'%Y/%m/%d %H:%M:%S\')<CR><Esc>', { noremap = 1 }) -- 'Insert [T]imestamp - date[t]ime'
|
||||||
|
|
||||||
|
vim.g.rainbow_active = 1 -- 0 if you want to enable it later via :RainbowToggle
|
||||||
|
|
||||||
|
vim.g.iosftrk_folddisable = 1 -- intel
|
||||||
|
vim.g.iosfsbtrk_folddisable = 1 -- intel
|
||||||
|
vim.g.pcietrk_folddisable = 1 -- intel
|
||||||
|
|
||||||
|
-- [[ Highlight on yank ]]
|
||||||
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
group = highlight_group,
|
||||||
|
pattern = '*',
|
||||||
|
})
|
||||||
|
|
||||||
|
-- NERDTree
|
||||||
|
vim.api.nvim_set_keymap('n', '<c-t>', ':NERDTreeToggle %<CR>', { noremap = 1 })
|
||||||
|
vim.g.NERDTreeShowBookmarks = 1
|
||||||
|
vim.g.NERDTreeIgnore = {'\\.py[cd]$', '\\~$', '\\.swo$', '\\.swp$',
|
||||||
|
'^\\.git$', '^\\.hg$', '^\\.svn$', '\\.bzr$'}
|
||||||
|
vim.g.NERDTreeChDirMode = 3
|
||||||
|
vim.g.NERDTreeQuitOnOpen = 1
|
||||||
|
vim.g.NERDTreeMouseMode = 2
|
||||||
|
vim.g.NERDTreeShowHidden = 1
|
||||||
|
vim.g.NERDTreeKeepTreeInNewTab = 1
|
||||||
|
vim.g.nerdtree_tabs_open_on_gui_startup = 0
|
||||||
|
|
||||||
|
-- Filetype assignments - TODO: Is there an automatic way for this?
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *.sv,*.svh set filetype=verilog_systemverilog")
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *iosfsb_trk.out set filetype=iosfsbtrk")
|
||||||
|
vim.cmd("au! BufRead,BufNewFile *iosf_trk.out set filetype=iosftrk")
|
||||||
|
|
||||||
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
-- vim: ft=lua ts=4 sts=4 sw=4 et
|
@ -2,12 +2,17 @@
|
|||||||
# TMUX Configuration file
|
# TMUX Configuration file
|
||||||
#
|
#
|
||||||
# General settings {{{
|
# General settings {{{
|
||||||
set -g default-terminal "xterm-256color"
|
# set -g default-terminal "xterm-256color"
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
set -g default-command "$SHELL -l"
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
unbind-key C-b
|
unbind-key C-b
|
||||||
bind-key C-a send-prefix
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
set -as terminal-overrides ',*:U8=a0'
|
# vi mode
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
set -as terminal-overrides ",*:U8=a0"
|
||||||
|
# set-option -ga terminal-overrides ",screen-256color:Tc"
|
||||||
|
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
set -g status-position top
|
set -g status-position top
|
||||||
@ -23,15 +28,18 @@
|
|||||||
# set -g @plugin 'git@github.com/user/plugin'
|
# set -g @plugin 'git@github.com/user/plugin'
|
||||||
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||||
|
|
||||||
|
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status) %H:%M"
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'jimeh/tmux-themepack'
|
set -g @plugin 'jimeh/tmux-themepack'
|
||||||
set -g @themepack 'powerline/default/gray'
|
set -g @themepack 'powerline/default/gray'
|
||||||
|
|
||||||
set -g @themepack-status-right-area-left-format "#(~/bin/tmux_status) %H:%M"
|
|
||||||
# }}}
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Keyboard shortcuts {{{
|
# Keyboard shortcuts {{{
|
||||||
|
# Reload tmux config
|
||||||
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
|
||||||
|
|
||||||
# Navigation
|
# Navigation
|
||||||
bind -n M-h select-pane -L
|
bind -n M-h select-pane -L
|
||||||
bind -n M-j select-pane -D
|
bind -n M-j select-pane -D
|
||||||
@ -45,13 +53,18 @@
|
|||||||
# Clipboard integration
|
# Clipboard integration
|
||||||
# ctrl+c to send to clipboard
|
# ctrl+c to send to clipboard
|
||||||
|
|
||||||
# Selection with mouse should copy to clipboard right away, in addition to the default action.
|
# # Selection with mouse should copy to clipboard right away, in addition to the default action.
|
||||||
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
|
# unbind -n -T copy-mode-vi MouseDragEnd1Pane
|
||||||
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
# bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
||||||
|
|
||||||
# Middle click to paste from the clipboard
|
# unbind -n -T copy-mode-vi 'v'
|
||||||
unbind-key MouseDown2Pane
|
# bind -T copy-mode-vi 'v' send -X begin-selection
|
||||||
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
# unbind -n -T copy-mode-vi 'y'
|
||||||
|
# bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
|
||||||
|
|
||||||
|
# # Middle click to paste from the clipboard
|
||||||
|
# unbind-key MouseDown2Pane
|
||||||
|
# bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Footer {{{
|
# Footer {{{
|
||||||
|
Loading…
Reference in New Issue
Block a user