1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-20 00:37:44 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
b9bda1b504 nvim: specified clang tabwidth 2023-09-15 18:29:00 +02:00
1d2d759f3f sxhkd: improved keymap command 2023-09-15 18:26:18 +02:00
3605c38993 nvim: use ftplugin for filetypes 2023-09-15 18:25:47 +02:00
11 changed files with 64 additions and 120 deletions

View File

@ -0,0 +1,9 @@
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
command = '!cclear'
})
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,9 @@
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
callback = function() vim.o.foldenable = false end
})
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,9 @@
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
command = '!texclear %'
})
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -73,15 +73,28 @@ vim.o.foldenable = true
vim.o.conceallevel = 0 vim.o.conceallevel = 0
vim.g.markdown_folding = 1 vim.g.markdown_folding = 1
-- read files correctly
vim.filetype.add({
extension = {
c = 'c',
h = 'c',
html = 'html',
java = 'java',
js = 'javascript',
lua = 'lua',
md = 'markdown',
nim = 'nim',
py = 'python',
tex = 'tex',
}
})
-- load general mapped keys -- load general mapped keys
require('style') require('style')
-- load plugins (autoload all files in plugin folder) -- load plugins (autoload all files in plugin folder)
require('loadplugins') require('loadplugins')
-- set filetypes correctly by extension
require('autocmd')
-- load general mapped keys -- load general mapped keys
require('keymap') require('keymap')

View File

@ -1,116 +0,0 @@
-- read files correctly
vim.filetype.add({
extension = {
c = 'c',
h = 'c',
html = 'html',
java = 'java',
js = 'javascript',
lua = 'lua',
md = 'markdown',
nim = 'nim',
py = 'python',
tex = 'tex',
}
})
-- settings for filetype: c
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
pattern = { '*.c' },
command = '!cclear'
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'c' },
command = 'set colorcolumn=80'
})
-- settings for filetype: java
vim.api.nvim_create_autocmd({ 'FileType' },
{
pattern = { 'java' },
command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'java' },
command = 'set colorcolumn=100'
})
-- settings for filetype: javascript
vim.api.nvim_create_autocmd({ 'FileType' },
{
pattern = { 'javascript' },
command = 'setlocal shiftwidth=2 softtabstop=2',
})
-- settings for filetype: lua
vim.api.nvim_create_autocmd({ 'FileType' },
{
pattern = { 'lua' },
command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'lua' },
command = 'set colorcolumn=100'
})
-- settings for filetype: markdown
vim.api.nvim_create_autocmd({ 'FileType' },
{
pattern = { 'markdown' },
command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'markdown' },
command = 'set colorcolumn=100'
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'markdown' },
command = 'set nofoldenable'
})
-- settings for filetype: nim
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'nim' },
command = 'set colorcolumn=80'
})
-- settings for filetype: python
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'python' },
command = 'set colorcolumn=80'
})
-- settings for filetype: tex
vim.api.nvim_create_autocmd({ 'VimLeave' },
{
pattern = { '*.tex' },
command = '!texclear %'
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{
pattern = { 'tex' },
command = 'set colorcolumn=80'
})

View File

@ -25,7 +25,7 @@ super + m
thunderbird thunderbird
super + shift + l super + shift + l
setxkbmap -query | grep -q ' de' && $(setxkbmap ru ; notify-send 'sxhkd' 'Set keymap to russian') || $(setxkbmap de nodeadkeys ; notify-send 'sxhkd' 'Set keymap to german') setxkbmap -query | grep -q 'nodeadkeys' && $(setxkbmap de ru ; notify-send 'sxhkd' 'Set keymap to russian') || $(setxkbmap de nodeadkeys ; notify-send 'sxhkd' 'Set keymap to german')
super + shift + r super + shift + r
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config' pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'