iron.nvim icon indicating copy to clipboard operation
iron.nvim copied to clipboard

Splits not working as expected

Open im-AMS opened this issue 3 years ago • 3 comments

I want to have ipython terminal open on right half of my screen. I have tinkered with all possible combinations of splits. Its not working. How do I fix this?

this is my /nvim/after/plugin/iron.lua

local iron = require "iron.core"
local view = require "iron.view"

iron.setup({
    config = {
        should_map_plug = false,
        scratch_repl = true,
        repl_definition = {
            python = {
                command = { "ipython" },
                -- format = require("iron.fts.common").bracketed_paste,
            },
            sh = {
                command = { "zsh" }
            }
        },
    },
    keymaps = {
        send_motion = "ctr",
        visual_send = "ctr",
    },
    repl_open_cmd = view.split.vertical.botright(50)
})

im-AMS avatar Dec 25 '22 10:12 im-AMS

This works for me @im-AMS : repl_open_cmd = view.split.vertical.botright(0.5)

goingtosleep avatar Dec 30 '22 01:12 goingtosleep

you need to do this: repl_open_cmd = require("iron.view").split.vertical.botright(0.5)

here is how my setup looks:

iron.setup {
    config = {
        scratch_repl = true,
        should_map_plug = false,

        repl_definition = {
            sh = {
                -- Can be a table or a function that
                -- returns a table (see below)
                command = {"zsh"}
            },
            python = {
                command = { "anaconda_python.bat" },
                format  = require("iron.fts.common").bracketed_paste,
            },

        },
        repl_open_cmd = require("iron.view").split.vertical.botright(0.5)
    },
    keymaps = {
        visual_send = "<F10>", --"<leader>sc",
        send_line   = "<F11>", --"<leader>sl",
        cr          = "<leader>s<cr>",
        interrupt   = "<leader>s<space>",
        exit        = "<leader>sq",
        clear       = "<leader>cl",
  
    },
    highlight = {
        italic = true
    },
    ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}

angelidis avatar Jan 06 '23 19:01 angelidis

I want to have ipython terminal open on right half of my screen. I have tinkered with all possible combinations of splits. Its not working. How do I fix this?

this is my /nvim/after/plugin/iron.lua

local iron = require "iron.core"
local view = require "iron.view"

iron.setup({
    config = {
        should_map_plug = false,
        scratch_repl = true,
        repl_definition = {
            python = {
                command = { "ipython" },
                -- format = require("iron.fts.common").bracketed_paste,
            },
            sh = {
                command = { "zsh" }
            }
        },
    },
    keymaps = {
        send_motion = "ctr",
        visual_send = "ctr",
    },
    repl_open_cmd = view.split.vertical.botright(50)
})

The view works~ You just put it the wrong place! CHECK the comment above.

meicale avatar Apr 21 '23 07:04 meicale