Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splits not working as expected #313

Open
im-AMS opened this issue Dec 25, 2022 · 3 comments
Open

Splits not working as expected #313

im-AMS opened this issue Dec 25, 2022 · 3 comments

Comments

@im-AMS
Copy link

im-AMS commented Dec 25, 2022

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)
})

@goingtosleep
Copy link

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

@angelidis
Copy link

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
}

@meicale
Copy link

meicale commented Apr 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants