summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/turkish-deasciifier.lua
blob: c39a35d1cdfc6b5f0ed02ccf81ead564349bb940 (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
return {
    {
        "yigitsever/turkish-deasciifier.vim",
        init = function()
            local map = require("helpers.keys").map

            -- brute force deasciify everything
            map({ "n", "x" }, "<leader>tc", "TurkishDeasciifyForce()", "force turkish characters",
                { expr = true })
            map("n", "<leader>tctc", "TurkishDeasciifyForce() .. '_'", "force turkish characters eol",
                { expr = true })

            -- use turkish-mode to selectively deasciify
            map({ "n", "x" }, "<Leader>tr", "TurkishDeasciify()", "infer turkish characters", { expr = true })
            map("n", "<Leader>trtr", "TurkishDeasciify() .. '_'", "infer turkish characters eol",
                { expr = true })

            -- ascii everything
            map({ "n", "x" }, "<Leader>rt", "TurkishAsciify()", "remove turkish characters", { expr = true })
            map("n", "<Leader>rtrt", "TurkishAsciify() .. '_'", "remove turkish characters eol",
                { expr = true })
        end,
    }
}